Repository navigation
fix(release): repair v3.8.50 base-red tail after latest root lift - #10964
Conversation
44c9688 to
2ebf94e
Compare
4f5a171 to
5608ff1
Compare
c9bd8d8 to
fcad2db
Compare
|
Nice repair — the production fixes are solid and the touched tests pass (glm Anthropic-header restore, CC-models 400 ordering, readyz force-dynamic, macOS netstat, and the clearRecoveredProviderState narrowing all verified against the current code). One thing to fix before merge: your i18n commits (i18n(pt-BR)/i18n(vi): onboarding password-warning keys from #10855) add [OPTIONAL] I couldn't run hard-session-lease-bypass-inventory.test.ts (the 4→2 providers/route.ts count) or context-manager.test.ts (the removed windsurf claude-opus-4.7-max assertion) — CI hangs on inherited DB handles in my env, not your code. A quick local run to confirm those two expectations match the real AST counts / registry data would close the loop. Thanks for the careful work. |
…cheaper-inference#10944 PR cheaper-inference#10944 intentionally moved the Kimi Web executor's default base URL from www.kimi.com to www.kimi.ai (env-overridable via KIMI_WEB_BASE_URL) but left two test files asserting the old domain, so every unit shard failed on release/v3.8.50: - tests/unit/executor-kimi-web.test.ts — 'execute targets www.kimi.com' and its capturedUrl.startsWith assertion - tests/unit/web-cookie-providers-new.test.ts — 'Kimi Web: targets www.kimi.com' hostname equality Both domains serve the same Connect-RPC endpoint (verified live: POST /apiv2/kimi.gateway.chat.v1.ChatService/Chat returns the identical unauthenticated JSON on each), so the executor change stands; only the stale assertions needed updating. Verified: both suites green locally.
…NDALONE_DIR vars Three merged features read env vars that were never added to .env.example / ENVIRONMENT.md, breaking the env-doc contract gate (check-env-doc-sync + issue-7793 repro test) on release/v3.8.50: - KIMI_WEB_BASE_URL / KIMI_WEB_CHAT_URL — Kimi Web executor overrides (cheaper-inference#10944 moved the default to www.kimi.ai but never documented the override knobs) - OMNIROUTE_OIDC_DISABLE_PASSWORD_LOGIN (+ bare alias OIDC_DISABLE_PASSWORD_LOGIN) — OIDC-only login flag (cheaper-inference#10889) - OMNIROUTE_STANDALONE_DIR — build-time standalone output override (scripts/build/colocate-standalone.mjs, cheaper-inference#10936) check-env-doc-sync.mjs now reports "✓ Env / docs contract is in sync" and both sync tests pass 15/15.
cheaper-inference#10804 (fa0cd5a) moved agent-endpoint discovery (a live api2.cursor.sh GetServerConfig call) ahead of request building inside CursorExecutor.execute. The two executor-level image-validation tests use a fake access token, so discovery now fails with a real 401 before image validation ever runs — the tests saw 401/500 instead of the sanitized 400 they assert. Stub globalThis.fetch for the ServerConfigService call with a minimal valid protobuf response (field-27 submessage, varint-encoded tag, *.api5.cursor.sh hosts accepted by validateCursorAgentUrl). Image validation itself is untouched and still exercised end-to-end. 28/28 green.
…est tests
recordRejectedRequestUsage persists the call_logs row via a
fire-and-forget saveCallLog().catch(() => {}); the usage_history await
gives no ordering guarantee for it. Recent async-path changes made the
write land after the test's synchronous read, failing three assertions.
Poll briefly (10ms x 50) for the row before asserting. Semantics under
test unchanged — both rows must still be written.
10/10 green.
…chable cheaper-inference#10859 (3805494) taught the reroute heuristic to consider not-combo text-only models, so the three describe-path assertions in vision-bridge-maxchars.test.ts were silently hijacked by a live reroute (meta.rerouted=true) before reaching the describe branch. Inject hasUsableCredentials: async () => false — the definitive exclusion signal per visionBridgeRouter's fail-open contract — so the describe path under test actually runs. 5/5 green.
GlmExecutor.buildHeaders, deriving the transport solely from providerSpecificData. But executeTransport() — the internal OpenAI → Anthropic fallback path — never surfaced the fallback transport into providerSpecificData, so a coding-endpoint 404 fell back to the Anthropic URL while still sending Bearer-Authorization coding headers (x-api-key lost). The regression was silent: requests still succeeded against Z.AI's tolerant gateway but broke strict header validation. executeTransport() now passes primaryTransport: "anthropic" through providerSpecificData when building headers for the Anthropic transport, and the unit tests select the transport the same way after the cheaper-inference#10798 signature change. 18/18 green.
The 8c4a219 revert of cheaper-inference#10828 accidentally re-scrambled the ordering inside the isAnthropicCompatibleProvider branch of the provider models route: the cached-discovery / auto-fetch-disabled fallbacks ran BEFORE the isClaudeCodeCompatibleProvider rejection, so a CC node with no cached catalog got a misleading 200 {models: [], warning: "Auto-fetch disabled"} instead of the contractual 400 "does not support models listing". Restore cheaper-inference#10828's original order — CC rejection first — and update the cache-marker ttl expectation for
cheaper-inference#9708 (aa32d2e) added a one-shot same-account retry for retryable pre-output transport failures (503/507). The combo live-test path (X-Internal-Test: combo-health-check) already disables cooldown-aware retry and circuit breakers so the dashboard health probe reflects exactly one real upstream call — but the new same-account retry sat outside those bypasses, so a failing provider produced two upstream calls and broke the single-call contract. Extend the existing skip set (emergency fallback, combo targets) with forceLiveComboTest. 5/5 green.
The cheaper-inference#9442 filesystem proof hardcoded /usr/bin/cp (GNU coreutils on Linux). macOS keeps BSD coreutils at /bin/cp, so local runs failed with spawnSync ENOENT before the assertion could exercise the umask behaviour. Probe both standard locations and use whichever exists.
…nce#10855 Same base-inherited drift as the vi mirror: c130f2a brought two new onboarding keys to en.json without the pt-BR translation.
fcad2db to
7c0ad1c
Compare
|
Addressed and rebased onto current
The latest base also introduced four unsuppressed Updated head: |
e38731e to
70810f5
Compare
|
Addressed the mandatory review item and pushed the amended head as
Local validation is clean: docs-all, agent-skills sync, ESLint, core typecheck, file-size gate, i18n coverage/value drift, Vitest (43 files / 401 tests), and the focused AI Horde/i18n/webhook suites (27/27). GitHub CI is rerunning on the amended head. |
70810f5 to
365d00e
Compare
|
Amended again at |
365d00e to
30b970a
Compare
… oauth start (cheaper-inference#11164) (cheaper-inference#11173) Cherry-picked onto the current tip (authorship preserved), noise stripped. Focused: oauth-device-flow-11164 green + 9474-claude-code-oauth-mismap neighbor suite green. Device-code endpoint is tried first, camelCase/snake_case fallbacks normalized, no more blank code / 'Visit: undefined'. Fixes cheaper-inference#11164. Thank you @rqzbeh!
… providers (cheaper-inference#11100) (cheaper-inference#11155) Cherry-picked onto the current tip (authorship preserved), generated-count noise stripped. Two pre-merge adjustments: (1) dropped the unrelated localDb.ts re-export hunk (nothing in this PR uses those symbols); (2) automated security review flagged the blocked-provider list resolving once at server creation — the handler now rebuilds the schema per invocation via the resolver (advertised tools/list schema stays a creation-time snapshot, which is inherent to MCP). Vitest: new runtime-blocked-schema suite 3/3, full MCP __tests__ 118/118; contract suites (mcp-web-search-provider-enum-contract, search-blocked-providers-11100) 6/6; typecheck clean. This closes the residual gap noted when cheaper-inference#11120 was closed. Thank you @rqzbeh!
…antiation (cheaper-inference#11039) (cheaper-inference#11163) Cherry-picked onto the current tip (authorship preserved), noise stripped. Validated on BOTH runtimes: bun test tests/unit/db-adapters/ 44/44 under the pinned Bun 1.3.14 (native bun:sqlite path), and node --test on the same suite 52 pass / 0 fail / 1 skip (Bun-only adapter skips under Node, as designed). Dockerfile.bun entrypoint now matches the standalone runner shape. Follow-up to cheaper-inference#11039. Thank you @rqzbeh!
…workflow (cheaper-inference#11039) (cheaper-inference#11168) Cherry-picked onto the current tip (authorship preserved, Dockerfile.bun conflict with the just-merged cheaper-inference#11163 resolved additively — runner-web stage after the new entrypoint). Three pre-merge fixes on the branch: (1) generated-count noise stripped; (2) runner-web stage now returns to the non-root bun user after the apt install (mirrors the Node Dockerfile runner-web re-asserting USER node — the stage previously ended as root); (3) the 6 new build/manifest steps SHA-pinned so the zizmor ratchet stays at 191<=192 findings instead of regressing to 197 (actionlint clean). Workflow YAML parses; runner-base/runner-web targets cross-checked against the Dockerfile stages. Thank you @rqzbeh!
…nference#11122) (cheaper-inference#11154) Validated on a worktree over the current tip: the red it fixes reproduced exactly as described (media-page-client-browser-bundle red since cheaper-inference#11122 — providerRegistry became reachable from the dashboard client bundle via node:net). Post-fix: bundle test 2/2 green, new ip-parity suite + is-local-provider 7/7, all 7 outboundUrlGuard consumer suites 76/76 (the moved normalizeHost/isPrivateHost keep their re-exports; routing behavior untouched). Thank you @yourspraveen — clean surgical extraction with a pure-JS ipVersion mirroring Node's own regexes.
… test (cheaper-inference#11160) Validated against code before merge: 159 migration files on disk, 56 free-forever (Hack Club removal), 40 pools — counts verified, not trusted. check:docs-counts exit 0 (HARD failures drained; the 2 remaining soft executors-count notes are pre-existing on the tip) and check:test-discovery OK (orphan moved into the collected tree). These reds came from cheaper-inference#11103/cheaper-inference#11123 merging without the count regen — thanks for sweeping them @yourspraveen!
…-inference#11071) (cheaper-inference#11165) Validated on a worktree over the current tip: account-fallback-service 91/91 plus the five sibling lockout suites 24/24. The measurement in the body (40 of 111 passthroughModels providers uncovered on this branch) is the clincher — one lookup via getProviderById().passthroughModels beside the existing checks, closing the cheaper-inference#11071 remainder for shared-registry gateways (port of cheaper-inference#11075 which had only landed on main). Thank you @yourspraveen!
… confirmed) (cheaper-inference#11114) Validated on the combined batch board over tip 92ef3c7: static gates clean (changelog, file-size, complexity 2624<=2774, cognitive 1182<=1223, dead-code 411<=416), typecheck:core clean, focused tests green. Companion to cheaper-inference#11113 (consumer side): tokenrouter joins BUILTIN_PROVIDERS_SYSTEM_MUST_BE_FIRST — memory-system-first-6135 suite green. Live-confirmed 400 class documented in the body. Thank you @ggdayup!
…inference#11162) Validated on the combined batch board over tip 92ef3c7: static gates clean (changelog, file-size, complexity 2624<=2774, cognitive 1182<=1223, dead-code 411<=416), typecheck:core clean, focused tests green. Combo without models is now refused at the schema boundary (API 400), the CLI flags it, and openapi.yaml matches the real contract (phantom props removed). combo-* suites + cli-combo-create-models green on the board. Closes cheaper-inference#10954. Thank you @maxmad64bis!
…e) (cheaper-inference#11158) Validated on the combined batch board over tip 92ef3c7: static gates clean (changelog, file-size, complexity 2624<=2774, cognitive 1182<=1223, dead-code 411<=416), typecheck:core clean, focused tests green. Empty-envelope 400 (no error field, empty content, finish_reason null) now rotates/retries instead of propagating as success; 200/streaming path never buffered; real-error 400s untouched. account-rotation + new rotation suite 34/34 on the board. Thank you @maxmad64bis!
…stem message (cheaper-inference#11113) Validated on the combined batch board: purify-system-first suite 4/4, typecheck clean. Pre-merge: file-size baseline gained a frozen entry for contextManager.ts at 1001 (+1, this PR's merge-into-leading-system branch) with a dated annotation — the gate caps unlisted files at 1000. Producer side of the live-confirmed TokenRouter 400 class: no internal path emits a mid-array system message anymore. Thank you @ggdayup — the call-log evidence made this airtight!
…ly output (cheaper-inference#11151) Merged after conflict resolution against the tip's cheaper-inference#11109 (per-call tool_call tracking): scanOpenAiSseText keeps the per-call finish_reason special-case AND gains reasoningText + literal finishReason; canContinue uses the in-flight predicate with the new reasoning-only-clean-stop escape. One integration fix on the branch: the PR's hallucinatedEmptyStop referenced emittedToolCall, which cheaper-inference#11109 had renamed — the branch now tracks emittedSawToolCall at the emitted level (any tool_call delta, complete or not), preserving the PR's don't-recover-after-tool-calls intent. Chain suites green: stream-continuation-wiring + stream-continuation + stream-recovery-toolcall 29/29. Thank you @maxmad64bis!
…f concatenating it raw (cheaper-inference#11152) Merged after sibling cheaper-inference#11151 landed: streamRecovery.ts auto-merged byte-identical to the validated combined board; the test-file conflict (both PRs added suites at the same anchor) resolved keeping all 11 tests — cheaper-inference#11151's four clean-stop cases plus this PR's three threshold cases, with the PR's updated partial-tail fixture for the pre-existing overlap test. Full chain green: 32/32 (wiring + continuation + toolcall regression). The documented 8-char overlap threshold ends the silent mid-word gluing. Thank you @maxmad64bis!
cheaper-inference#11190) * feat(api): structured ?format=json for the self-service usage endpoint GET /api/usage/om-usage already let any key read its own usage — personal daily/weekly USD limits and the provider quota snapshot — but only as text/plain, which a UI cannot parse safely. OmniCopilot issue cheaper-inference#8 asks exactly for this surface. Adds ?format=json, returning the ApiKeyUsageLimitStatus + UsageSnapshot the text is rendered from. Text and JSON share the same collectors (collectUsageSnapshots, getApiKeyUsageLimitStatus), so the two can never disagree about a number. The response is a discriminated union: a key without allowUsageCommand (403) or an invalid key (401) returns { allowed:false, error:{message} }, distinct from allowed:true with empty sections — the state a panel must render as "nothing learned yet", not a refusal. Text form unchanged; without ?format the contract is untouched. The endpoint was previously missing from API_REFERENCE.md; it now has a section documenting both forms, the allowUsageCommand gate, and the self-service auth model (caller's own key, not requireManagementAuth). Regression guards in tests/unit/usage-command-json-format.test.ts (4 tests: json shape, text default preserved, structured 403, sanitized 401 with no stack trace). Existing internal-usage-command suite still 12/12. * chore(changelog): correct the fragment to the real PR number (cheaper-inference#11190) --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me>
…-usage json (cheaper-inference#11192) * feat(api): structured ?format=json for the self-service usage endpoint GET /api/usage/om-usage already let any key read its own usage — personal daily/weekly USD limits and the provider quota snapshot — but only as text/plain, which a UI cannot parse safely. OmniCopilot issue cheaper-inference#8 asks exactly for this surface. Adds ?format=json, returning the ApiKeyUsageLimitStatus + UsageSnapshot the text is rendered from. Text and JSON share the same collectors (collectUsageSnapshots, getApiKeyUsageLimitStatus), so the two can never disagree about a number. The response is a discriminated union: a key without allowUsageCommand (403) or an invalid key (401) returns { allowed:false, error:{message} }, distinct from allowed:true with empty sections — the state a panel must render as "nothing learned yet", not a refusal. Text form unchanged; without ?format the contract is untouched. The endpoint was previously missing from API_REFERENCE.md; it now has a section documenting both forms, the allowUsageCommand gate, and the self-service auth model (caller's own key, not requireManagementAuth). Regression guards in tests/unit/usage-command-json-format.test.ts (4 tests: json shape, text default preserved, structured 403, sanitized 401 with no stack trace). Existing internal-usage-command suite still 12/12. * chore(changelog): correct the fragment to the real PR number (cheaper-inference#11190) * feat(api): return every connection's snapshot under providers[] in om-usage json Closes cheaper-inference#11191. buildUsageCommandJson picked a single snapshot via selectUsageSnapshot, so a panel could only ever show one provider. The collector already had them all — the single-pick is a presentation choice for a terminal. The JSON form now also returns the full UsageSnapshot[] alongside the selected provider, so a UI can render Codex / Claude / OpenCode side by side. The text form is untouched. --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me>
… links through the shortener (cheaper-inference#11196) - New CheaperInferenceSponsorBanner on the dashboard home, same size/shape as KimiSponsorBanner, no version gate (durable partnership). Uses the cheaperinference ProviderIcon and the brand green (#31f889) with the dark ink CTA (contrast, per colors.ts token). - CTA points at https://link.omniroute.online/cheaper — the branded short link — so clicks land in our Kutt metrics. - VscodeCopilotBanner CTA now points at https://link.omniroute.online/vsx instead of the raw Marketplace URL, for the same reason. - i18n strings in en + pt (en is the namespace-level fallback for the other 41 locales). - Tests: new cheaperInferenceSponsorBanner.test.tsx (render, CTA href, dismiss persistence); vscodeCopilotBanner.test.tsx updated to the new CTA URL. Co-authored-by: Xiangzhe <bakryun0718@proton.me>
… response quality validation (cheaper-inference#11036) SSE comment lines (OpenRouter keep-alives) and leading whitespace no longer fail the combo quality gate's JSON fallback. First contribution — clean minimal fix with test. Thank you @asorourx, welcome aboard!
…rence#11041) Compaction-V2 output now counts as real model output (no synthetic response.failed after response.completed), the Codex SSE filter handles CRLF framing, and terminal detection runs before scan-state bounding. 88/88 stream/readiness suites on the board. Thank you @jackjinke!
…11020) Validated on the combined batch board + this branch alone: chat-body-admission + authz/pipeline 65/65, file-size gate green with a dated frozen entry (chatBodyAdmission 1005→1009 — the +4 lease/drain wiring lines, owner-authorized rebaseline). trackRequest was never called, so SIGTERM waitForDrain saw zero in-flight and killed live SSE; leases now hold the drain counter for the stream's lifetime, and the 503 carries Retry-After. Closes cheaper-inference#11015. Thank you @RaviTharuma!
… retrieve tool (cheaper-inference#11084) Validated on the combined batch board + this branch: ccr-non-mcp-full-prompt-loss + ccr-retrieval-ramp 20/20, file-size gate green with the ccr/index listing (1024, dated annotation — owner-authorized). The callerSupportsCcrRetrieve gate now skips the whole engine for callers whose tools[] cannot reach omniroute_ccr_retrieve — no more 15KB prompt arriving upstream as 112 tokens. Production-measured root cause, textbook TDD. Thank you @HouMinXi!
…0963) Merged after conflict resolution in modelMetadataRegistry.ts: the tip's effortTiers chain (declared efforts → declared tiers → undefined-if-thinking-declared → codex extension) now carries this PR's GLM guard as the final-fallback override — GLM-family models without a provider-declared contract get the authoritative empty tier list instead of generic OpenAI tiers. GLM/ZCode suites 40/40 on the resolved branch. Closes cheaper-inference#10962. Thank you @xz-dev!
…heaper-inference#10949, cheaper-inference#10959) (cheaper-inference#10961) Validated on the combined batch board + this branch: 231/231 across chatcore-translation-paths, reasoning-cache, strip-reasoning-blobs, and both Responses translator suites. Pre-merge: propagated the cheaper-inference#11110/cheaper-inference#11129 summary:[] defaults into five assertions here (each commented with its PR) — without it this branch red against the tip, and as a bonus the merge drains the 4 reasoning reds that were live on the tip from those merges. Plaintext now wins over a coexisting opaque companion; opaque-only drops cleanly for plaintext targets; combos keep explicit Skip. Fixes cheaper-inference#10949 and cheaper-inference#10959. Thank you @jackjinke!
…eaper-inference#10644) (cheaper-inference#10987) Merged after count reconciliation: the branch's regenerated docs claimed 57 free forever / 157 migrations from its older base; gate-verified values on the current tip are 56 free forever (Logfare carries a Free badge via gateways.ts freeNote but has no freeModelCatalog per-model entries, so the live-code counter stays at 56) and 159 migrations — the README/SVGs now match the check:docs-counts output exactly. provider-consistency OK at 267 registry / 349 canonical. logfare-registry 4/4, icon + KNOWN_PNGS + discovery-set membership all verified present. Closes cheaper-inference#10644. Thank you @jonlwheat2-gif!
…pe; production fixes kept)
79c5bdf
into
cheaper-inference:release/v3.8.50
…cheaper-inference#11203) Rebuilt on the current base (79c5bdf) after the owner's cheaper-inference#10964 fixed the first 7 failures (combos, HarImport, aihorde SSRF, config-generator 128K, quota 403, openrouter allExpired, pt-BR keys). This carries the remaining base-red failures: - guide-settings-route.test.ts: v2 providers.omniroute dual-write assertion — cheaper-inference#10964 updated the model-limit blocks but missed the stale content.providers === undefined assert (line 130) - t40-opencode-cli-tools-integration.test.ts: v2 schema assert - clinepass-provider.test.ts: z-ai/glm-5.2 vendor prefix (cheaper-inference#6108) - provider-alias-uniqueness.test.ts: Hack Club AI removal (cheaper-inference#11118) - eslint-suppressions.json: prune 2 stale entries - cli-combo-command.test.ts: pass models to combo create (cheaper-inference#11162, reported by reviewer as cheaper-inference#11203) — verified 5/5 on Linux (Docker)
…eaper-inference#10964) Merged after conflict triage: the six base-red repair files (vi.json, opencode.ts JSDoc, context-manager test, the three webhook dispatcher tests, the uncloseai orphan-test rename) were already drained on the tip by today's cheaper-inference#11130/cheaper-inference#11157/cheaper-inference#11160/cheaper-inference#11113 — those hunks resolved to the tip shape. What lands is the production-fix set: GLM transport-aware Anthropic headers, Claude Code-compatible model-listing rejection, combo live-test single-probe, zero-cost Auto-Combo interval normalization, recovery-clearing union handling, LLMLingua real-path compare, macOS netstat PID discovery, AI Horde R2 strict public-host validation. Sweep of every touched test file: 243/243 green; typecheck + file-size clean. (guide-settings-route's 4 reds reproduce on the pure tip — pre-existing drift from cheaper-inference#11079, not from here.) Thank you @backryun!
Summary
Rebased the base-red repair stream onto the current
release/v3.8.50tip (6cd4d38e2) and dropped patches already present upstream.The PR is 12 commits / 46 files and keeps only repairs still missing from the release branch.
Production fixes retained
x-api-keywithout a stale Bearer header.allExpiredsentinels without attempting a connection write./var↔/private/varfalse negatives.netstat -anv -p tcpin addition to Linuxss/netstat./v1/modelsdiscovery through an explicitmodelsUrl.Review and latest-base follow-up
securityDescSkipWarningand oneproviderRequiresPassword, at the same placement asen.json; both files parse cleanly.omni-webhookscatalog description.Validation
Final head:
d5c26f98bpt-BR.json/vi.json— one occurrence per requested keynpm run lint— passnpm run typecheck:core— passnpm run check:dashboard-typecheck— passnpm run check:docs-all— passnpm run check:agent-skills-sync— 46 unchanged, passnpm run check:file-size— passnpm run check:test-discovery— passnpm run check:mutation-test-coverage -- --strict— passnpm run i18n:check-ui-coverage— pass; pt-BR and vi 100%, 0 missing keysnpm run i18n:check-value-drift— passnpm run test:vitest— 43 files, 401 tests passGitHub CI is running against the amended head.
Closes the remaining base-red tail tracked in #9985.