Skip to content

Unify model providers and enforce budgets across recovery branches - #7

Merged
hongzuoj-pixel merged 1 commit into
mainfrom
feat/provider-runtime-v08
Oct 17, 2026
Merged

hongzuoj-pixel merged 1 commit into
mainfrom
feat/provider-runtime-v08

Conversation

@hongzuoj-pixel

@hongzuoj-pixel hongzuoj-pixel commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

The main harness previously used MiMo-specific authentication/parameters regardless of provider configuration and lacked explicit completion status and retry accounting. This unifies the supported text-completion adapters and makes every real request bounded, diagnosed and reserved before dispatch.

Changes:

  • Shared mock/OpenAI-compatible/Anthropic/generic HTTP contract for the main harness, universal runner and DeepSeek API wrapper. Existing MiMo config and five-value Python unpacking remain compatible.
  • Explicit finish reasons, actual/estimated/unavailable usage (including reported zero/cache counts), safe error codes and failure summaries. Truncated, empty, malformed, refused or unsupported tool output is never applied as a completed patch.
  • Bounded stdlib HTTP subprocesses, total deadlines, response/request byte limits, worker watchdog/cleanup and no credential-bearing redirects. Error bodies/tracebacks are not recorded; returned credential values are redacted.
  • Default one attempt; opt-in transient retries honor bounded Retry-After/backoff. Each attempt durably reserves request, input-byte/output-token and configured-price cost before sending.
  • A locked shared coordinator prevents repeated or concurrent recovery branches from resetting the original budget. Failed, interrupted and unknown-charge attempts are never refunded; original run snapshots stay immutable. Missing/damaged accounting blocks more requests.
  • Unknown prices produce null/Unknown costs, not a free-looking zero. Cost limits are conservative configured-price estimates, not provider invoices or certified tokenization.
  • Sealed provider accounting in portable bundles, consistency checks and actionable CLI/report diagnostics.
  • Reviewed product plan with separate exit conditions for API execution, CLI Agent/repair loops, additional adapter certification, new-user walkthroughs and final release acceptance.

Validation before publication:

  • Final non-editable v0.8.0 wheel on Python 3.12 / pytest 9.0.2: 197 passed, 5 explicit Docker skips (Docker unavailable locally), zero failures/errors. pip check and git diff --check pass.
  • 62 new contract/fault tests use actual local HTTP and processes: all four formats, retryable/permanent status codes, redirects, malformed/empty/truncated/tool output, usage provenance, byte/deadline limits including trickling bodies and the standalone watchdog, Ctrl-C and abrupt death, decimal budgets, failed/repeated/concurrent recovery and damaged/missing accounting.
  • Installed CLI API → actual project pytest → PASS → export → source relocation → offline gate; completed-response resume makes no new request. No paid-provider calls.
  • Existing 6 scoring invariants pass; existing core and evidence regression retained.
  • Published tree exactly matches tested tree: 7c7e03576d532738bfbfbaa35cfcb5d7ed33f684.

Remaining boundaries:

  • Live paid-provider trials require available credentials and an explicit spending allowance; local HTTP tests are not described as live service validation.
  • Certified CLI Agent/tool execution and finite repair loops are P2; additional Node/GenericCommand certification, independent usability reviews, licensing/release work and final completeness sign-off remain tracked in docs/PRODUCT_PLAN.md and docs/ACCEPTANCE_MATRIX.md.
  • Budgets apply to a recovery lineage, not a global provider account. Preserve the shared coordinator for recovery. Offline portable gates use sealed snapshots without that live coordinator.

Completed PR validation: https://github.com/hongzuoj-pixel/MiMo-CodeHarness/actions/runs/39032324055 — all 9 jobs passed on c43161e. Linux installed CLI: 197 passed/5 explicit Docker skips. Windows installed CLI: 192 passed/10 explicit skips (5 Docker + 4 POSIX SIGINT + 1 symlink privilege case). Real Docker: 5 passed. Python 3.10/3.12/3.13, pytest 8/9, fixed external case and offline browser/gate checks passed. Published tree: 7c7e03576d532738bfbfbaa35cfcb5d7ed33f684.

Post-merge validation: https://github.com/hongzuoj-pixel/MiMo-CodeHarness/actions/runs/39032550099 — all 9 jobs passed on main commit 7e51818, matching tested tree 7c7e03576d532738bfbfbaa35cfcb5d7ed33f684. A focused template-literal edge-case correction is tracked separately in #8.

@hongzuoj-pixel
hongzuoj-pixel merged commit 7e51818 into main Oct 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant