- Added optional `source?` field with value `'login'` to `apiKeyCredentialSchema` so snapshots accept login-sourced API keys.
- Updated CHANGELOG with a fixed entry describing the correction.
- Added a test verifying that a snapshot containing `source: "login"` passes client wire validation.
The Responses-Lite rewrite moves tools into an `additional_tools` developer
input and deletes top-level `tools`, but preserved a forced top-level
`tool_choice` (e.g. `{ type: "web_search" }`). With no top-level tools to
validate against, the ChatGPT Codex endpoint rejected the request with
`HTTP 400 Tool choice '…' not found in 'tools' parameter`, and web search
silently fell back to Gemini.
`applyCodexResponsesLiteShape` now sets `tool_choice: "auto"`, matching
codex-rs `build_responses_request`. Classic (non-Lite) Responses requests
keep their forced choice since top-level `tools` remains present.
Fixes#5771
The generic OpenAI-compatible output policy capped native K3 requests at 64,000 tokens even though its catalog metadata advertises Moonshot’s 131,072-token output limit.
- Generalized the Chat Completions provider clamp resolver.
- Allowed native moonshot/kimi-k3 to clamp against model.maxTokens.
- Preserved the existing 64k default for other OpenAI-compatible models and the existing raised GLM-5.2 reasoning clamp.
- Covered default and explicit 131,072-token K3 requests on the wire.
Fixes#5756
Derived the Anthropic Messages root from the configured OpenAI-compatible model base URL and covered custom gateway routing with a regression test.
Fixes#5722
Grok Build reports exhausted account balances as HTTP 402, which bypassed credential rotation. Treat that status and wording as persistent account-local quota exhaustion while preserving informative non-quota bodies in the backoff lane.
The fence-vs-span decision only treated a backtick run as a fenced block
when it sat immediately after a newline. CommonMark allows a fence indented
by up to three spaces, so an indented ```md block was read as an inline
span, closed at an inner triple-backtick string literal, and healed a later
literal reasoning tag as thinking.
Track the current line's leading-space count (reset on newline, invalidated
by the first non-space char) and open a fenced block when the run is >= 3
backticks at an indent of 0-3 spaces, matching the sibling FencedThinking
scanner's fence-line rule.
Fixes#5665
Code mode treated inline spans and fenced blocks identically, closing at
the first matching backtick run anywhere in the buffer. An inline triple-
backtick literal inside a fenced block (e.g. `const fence = '```';`) exited
code mode early, so a later literal reasoning tag in the same block was
healed as thinking and dropped from the rendered code.
Track whether the opener was a fence (a backtick run >= 3 at line start) or
an inline span. A fenced block now closes only on a fence line — a line of
backticks at least as long as the opener — streaming committed lines while
holding the last partial line; inline spans keep closing on the matching
backtick run.
Fixes#5665
ThinkingInbandScanner scanned the visible-text channel for leaked reasoning
open tags with a plain indexOf, ignoring Markdown code spans. A literal
`<think>` inside inline code or a fenced block was read as a reasoning
boundary, so the unmatched tag split the text into text + thinking and
corrupted the rendered Markdown.
The scanner now tracks code-span state: a backtick run enters code mode and
suppresses reasoning-tag detection until the matching closing run, streaming
the content through as verbatim text. Reasoning tags still win at any position
so the gemini ```thinking fence keeps healing.
Fixes#5665
- Implement `isInvalidatedOAuthTokenError` to identify specific upstream auth failures.
- Enable automatic credential rotation in `AuthStorage` and stream retries when an invalidated token is detected.
- Update `proxy.test.ts` to correctly handle `NO_PROXY` and `no_proxy` environment variables during testing.
- restored capability reset import in agent-session refreshSkills
- fixed renamed credential entry reference in auth-storage org fields
- aligned xai web-search fetch mock and refresh-race test with current typings
- Kept turnEnded as application-level state without settling the HTTP/2 request.
- Surfaced late CONNECT, gRPC trailer, request, and abort failures.
- Rejected streams that end before turnEnded and covered terminal lifecycle cases.
Fixes#5634
- Applied `applyOpenRouterReportedCost` in completion parsing and shared usage population so reported OpenRouter charges are now reconciled before tier adjustment.
- Scaled usage component costs by the reported-to-estimated ratio and retained an input-only fallback when estimated totals were missing.
- Added OpenRouter-specific usage tests for SSE responses and chunk parsing to assert done-message totals and component sums match reported cost.
- Updated the model catalog with new provider/model records and revised costs, limits, and metadata.
Strip nested fallback output_config.effort values before scanning beta requirements or serializing google-vertex requests. This prevents fallback overrides from reintroducing effort-2025-11-24 into the anthropic-beta header while preserving unrelated fallback fields.
Fixes#5614
Thinking-enabled Claude requests routed to google-vertex pushed the
effort-2025-11-24 beta into the anthropic-beta HTTP header, which Vertex
rawPredict rejects with a 400 invalid_request_error. The effortBeta push in
streamAnthropicOnce and the output_config.effort field in buildParams lacked
the provider guard that contextManagementBeta and the thinking-context path
already apply for Vertex.
Gate both the beta and the effort field off the google-vertex path so
thinking-enabled Claude sub-agents run on Vertex without the 400.
Fixes#5614
Added dependencies, dependentSchemas, and dependentRequired to UNSUPPORTED_SCHEMA_FIELDS so both the Google and CCA normalizers drop them before serializing to the OpenAPI-style Schema wire, which cannot model draft-2019 conditional keywords.
Kept them in the MCP subschema-map path (still coercing boolean entries) and documented the additions in CONSTRAINTS.md.
Fixes#5604
Added not to the CCA residual incompatibility gate so false boolean subschemas fall back before reaching the legacy object-shaped parameters wire.
Made residual scanning schema-map aware to avoid treating a property literally named not as the unsupported keyword, and added root, property, and dependentSchemas regressions.
Fixes#5604
- Added resolved sampling-parameter compatibility for OpenAI o-series and GPT-5+ models.
- Stopped Responses and Chat Completions payloads from forwarding temperature and related controls to restricted models.
- Added catalog and wire-payload regressions for GitHub Copilot GPT-5.6 Luna.
Fixes#5606
Generalized the schema-map walk context beyond properties to include patternProperties, dependencies, dependentSchemas, $defs, and definitions. Each arbitrary map entry is now treated as a subschema, so bare booleans coerce before reaching Google/CCA.
Reused the shared map/array keyword tables in the Ollama sanitizer and added a dependentSchemas regression for both Google and CCA normalizers.
Fixes#5604
Boolean JSON Schema subschemas (`true`/`false`, draft 6+) in MCP tool
inputs passed through normalizeSchemaForGoogle/normalizeSchemaForCCA
untouched. The Cloud Code Assist / Gemini protobuf Schema type has no
representation for a bare boolean, so requests bounced with a 400
INVALID_ARGUMENT before reaching the model.
Coerce booleans to their object equivalents (`true` -> `{}`,
`false` -> `{ not: {} }`) at the single normalizeSchemaNode choke point,
but only in genuine subschema slots (root, combiner branches,
subschema-valued keywords, property values). Keyword-slot booleans
(`nullable`, `enum` entries, `additionalProperties`) stay untouched so
Moonshot/MCP open-record markers survive.
Fixes#5604
Attached the Cursor HTTP/2 session error path to the provider stream completion before starting the request.
Added a subprocess regression that resets the TLS handshake and verifies the turn surfaces a stream error without terminating the process.
Fixes#5593
Keyed the non-official eager opt-in on resolved officialEndpoint provenance instead of a baseUrl equality check, so runtime provider baseUrl overrides that reroute canonical Anthropic models no longer leak eager_input_streaming even when the spec baked a resolved official compat block.
Fixes#5572
Demoted eager tool input streaming when runtime Foundry routing replaces the model's configured Anthropic URL, without disabling explicit support on authored custom endpoints.
Fixes#5572
Kept strict custom proxies free of both eager_input_streaming and the legacy fine-grained tool-streaming beta while preserving the official API fallback.
Fixes#5572