Repository navigation
fix(providers): carry Gemini, MiMo, DeepSeek, Mistral, opencode-go and audio adapter fixes for 2.90 - #7394
Conversation
Replace growing-prefix boundary checks with fixed-size suffix checks and one-pass whitespace tracking. Preserve progress-history semantics with bounded-work and parser/adapter regressions, and update the provider contract.
Cloud Code Assist Gemini requests opt into generationConfig.thinkingConfig.includeThoughts and classify returned thought: true parts as thinking_delta summaries when provider.showThinkingSummary is enabled, while Vertex and direct Gemini only forwarded thinkingLevel and left Google streaming silent for the entire reasoning phase (triggering 200s response-byte inactivity timeouts on long reasoning turns). Honor provider.showThinkingSummary on thinking-eligible Vertex and direct Gemini requests as well, subject to the same per-request hideThinkingSummary gate, non-image guard, and Gemini model-family check. Unopted providers, unladdered Vertex models, image models, and explicit summary:"none" requests remain unchanged.
* Declare GLM 5.3 native text input for vision sidecar enrollment. * Cover catalog publication, image preprocessing, and operator overrides. * Document image attachment support and client catalog refresh.
* Name the sync command and full client restart steps. * Explain restart effects and verify image attachments after relaunch.
…na, DeepSeek V4.1, and preview models
Parse Codex input_audio data URLs into a typed IR part, send WAV/MP3 as Chat input_audio parts, and promote tool-result audio into a follow-up user message. Refuse unsupported or remote audio at the adapter boundary and charge decoded bytes during input admission.
Refuse the Chat-shaped audio part in Responses input, keep developer audio out of the translated Chat role path while preserving developer documents, and add Cursor and Ollama fallback coverage.
Update the adapter authority, Chat compatibility, inbound boundary, and byte-accounting contracts for supported inline WAV/MP3 audio, tool-result promotion, refusal positions, native passthrough boundaries, and decoded-byte admission.
Include orphan-tool-result audio in the promotion contract and document raw base64 with an explicit WAV/MP3 format.
GPT-6 Luna bills by prompt-length tier, so one unconditional rate would misdescribe it. Keep its cost unknown like DeepSeek V4.1 Flash (peak/off-peak) and regenerate the metadata from the source snapshot. Co-authored-by: yeongjunyoo <47925973+yeongjunyoo@users.noreply.github.com>
…ages data plane providers-and-adapters.md has a 600-line budget; the carried note fits the vision-sidecar contract in data-planes/images.md instead. Co-authored-by: adaurban <31841049+adaurban@users.noreply.github.com>
Port shirruy's standalone bare-block recovery from #7260 (6da6d18), with Markdown-aware mid-line holding scoped to the synthetic-call path. Keep identified-wrapper reconciliation and its ambiguity rules separate. Retain only bounded detached candidates across streaming prose release; reject nested headers and disable recovery when an enclosing block becomes ambiguous. Preserve fenced/inline examples and invalidate candidates when structured calls arrive. Add buffered/streamed regressions and sync the structure contracts without growing openai-chat.ts past 822 lines. Co-authored-by: shirruy <63145023+shirruy@users.noreply.github.com>
Document the declared-freeform-only recovery gate, literal examples, identified-wrapper separation and streaming/argument retention bounds. Co-authored-by: shirruy <63145023+shirruy@users.noreply.github.com>
A queued upload rechecked only the credential selection, so revoking deepseekImageFiles or reloading configuration while it waited still sent the image to /files. Capture the configuration generation with the provider snapshot and refuse the physical upload when it or the model's opt-in changed. Co-authored-by: fontanierh <14199823+fontanierh@users.noreply.github.com>
The registry declares 1,048,576 tokens for opencode-go/deepseek-v4.1-flash; the snapshot row carried the rounded 1,000,000 figure and failed the existing never-undercut invariant. Co-authored-by: yeongjunyoo <47925973+yeongjunyoo@users.noreply.github.com>
Co-authored-by: fontanierh <14199823+fontanierh@users.noreply.github.com>
Carry Markdown context through the shared serialized-content buffer on all providers. Advance newline-header lookahead monotonically and stop standalone candidate traversal at its count bound, discarding any saved batch on overflow. Co-authored-by: shirruy <63145023+shirruy@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 68
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e17eea8590
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Held markup is released only now, as one batch per response: the doubled-input repair needs every call. | ||
| const references = reconcileStructuredToolCalls(calls.map(call => ({ wireName: call.name, restoredName: toolNames.restore(call.name), argumentsText: call.args, freeformTool: freeformTools.get(call.name) })), toolCallContent.current(), !toolCallContent.releasedAnswerText && /(?:^|[/-])mimo-v2(?:\.|$)/i.test(lastRequestedModelId ?? "")); | ||
| calls.forEach((call, index) => { call.args = references[index]!.argumentsText; }); | ||
| yield* toolCallContent.recoverStandalone(calls.length === 0, () => `call_${++toolCallSeq}`, name => toolNames.restore(name)); |
There was a problem hiding this comment.
Require a terminal frame before recovering bare calls
When a MiMo-V2 stream closes after emitting a complete bare block but before finish_reason or [DONE], sawUserFacingOutput is already true, so the generic EOF path calls this function and the unconditional recovery emits an executable tool call. Structured calls in the same EOF path are rejected as possible truncation, but synthetic calls bypass that safeguard and may execute a freeform tool such as exec from an incomplete response; gate standalone recovery on an observed terminal signal or fail this EOF case.
AGENTS.md reference: src/AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
| const parts = item.type === "function_call_output" || item.type === "custom_tool_call_output" | ||
| ? item.output : item.type === "message" || item.role ? item.content : undefined; |
There was a problem hiding this comment.
Skip uploads from roles DeepSeek rejects
For an opted-in Responses body over 40 MiB, the item.role truthiness check also selects system and assistant messages, causing their inline images to be uploaded and persisted before inference. DeepSeek explicitly rejects images in those roles, so these requests consume upload bandwidth and storage quota and retain user bytes despite being guaranteed to fail; restrict message uploads to user and developer, while retaining the two supported tool-output types. DeepSeek Responses API restrictions
Useful? React with 👍 / 👎.
Summary
Bundle B4a for 2.90: carries nine provider-adapter PRs (Google/Gemini, MiMo, DeepSeek, Mistral, opencode-go catalog, inline audio) onto current
dev, plus fixes found while integrating them and in review. Every carried change was replayed ontodev(cherry-pick, or a hand port for #7260), with each author credited by aCo-authored-bytrailer.User-visible results:
claude-*tool results stay contiguous before images (fix(google): keep Claude tool results contiguous before images #7303);showThinkingSummary: truenow also opts Vertex and direct Gemini intoincludeThoughtswhen the model has a non-empty reasoning ladder (feat(google): honor showThinkingSummary on Vertex and direct Gemini #7310). It stays explicit opt-in, andnoReasoningModels, empty ladders and image models are excluded.<tool_call>block with no structured call is recovered as the declared freeform call ([WRONG BRANCH] fix(chat): recover standalone MiMo bare blocks as synthetic freeform calls #7260 port, in a separate module).modelCapabilities.<model>.deepseekImageFiles: true.zai-glm-5-3is declared text-only, so it uses the vision sidecar (fix(mistral): enable vision sidecar for GLM 5.3 #7278).input_audiotranslates to Chat Completionsinput_audio(feat(chat): translate inline audio to Chat Completions #7271).Items fixed
None of the carried PRs links an open issue, so this PR closes no issues. #7278 relates to the already-closed #349. #7260 continues #7214, which was closed because it targeted the wrong branch. The carried PRs themselves are listed below for the coordinator to close.
Carried PRs
serialized-tool-call-content.tsandserialized-tool-call-markup.ts; nonce test)claude-*as writtennoReasoningModels/empty-ladder exclusion, stream/buffered parity testsdeepseekImageFilesopt-in, so a revoked opt-in or a config reload can no longer send the image (sol review P1, with a regression test). Registereddeepseek-image-files.tsin the Responses core module inventoryproviders-and-adapters.md, which went over its 600-line budget, intodata-planes/images.mdcostblock. It copied Haiku 5.5's flat rate, but Luna has prompt-length tiers, so cost is now unset (unknown, which is different from free), the same as DeepSeek V4.1 Flash with its peak/off-peak pricing. Raised DeepSeek V4.1 Flash's window from 1,000,000 to the registry-declared 1,048,576, because the existing never-undercut invariant failed. Regeneratedsrc/generated/model-metadata.tswithbun run generate:model-metadataand did not hand-edit itsrc/adapters/openai-chat/standalone-bare-tool-calls.ts, kept separate from #7293's identified-wrapper path.openai-chat.tsis 822/822<const VAR>wrapper heuristics, or repair raw/doubled arguments for non-freeform calls. Each one widens the contract beyond standalone recoveryCo-authored-by: luvs01 27862058+luvs01@users.noreply.github.com
Co-authored-by: fontanierh 14199823+fontanierh@users.noreply.github.com
Co-authored-by: yuanyuanlove 6202754+yuanyuanlove@users.noreply.github.com
Co-authored-by: chilung-cgu 215337896+chilung-cgu@users.noreply.github.com
Co-authored-by: adaurban 31841049+adaurban@users.noreply.github.com
Co-authored-by: yeongjunyoo 47925973+yeongjunyoo@users.noreply.github.com
Co-authored-by: harryzhou2000 67385896+harryzhou2000@users.noreply.github.com
Co-authored-by: shirruy 63145023+shirruy@users.noreply.github.com
Needs owner acknowledgement
docs-site/src/content/docs/reference/configuration/providers.mdstates the retention contract and the credential-isolated reference cache. Successful partial uploads are not deleted early; they stay until the one-hour expiry, and a retry reuses them.Held out
fix/provider-adapters-2.90-b.project: "auto") is held out. It sends each API key to an undocumented discovery endpoint, a new credential destination that needs an owner security decision.devalready supplies model-attributed Argon summary windows.Judgment calls
test:changedfailures were sorted into environment-only and pre-existing groups (listed below) and did not block this PR.Verification
Rebased onto
origin/devd3dafd3 (after #7388, #7389 and #7393). The repository pins Bun 1.4.3 as its test runner, so tests ran with Bun 1.4.3 from a scratch.tmp/copy; the host Bun was not changed.bun run typecheck: passbun run structure:check: passbun run privacy:scan: passbun test --isolate tests/adapters/openai/ tests/adapters/google/ tests/providers/deepseek-image-files.test.ts tests/providers/provider-config-validation.test.ts tests/providers/model-rename-migration.test.ts tests/vision/mistral-vision-sidecar.test.ts tests/codex-integration/catalog-opencode-go-static.test.ts tests/codex-integration/catalog-opencode-go-context-window.test.ts tests/codex-integration/model-metadata-sync.test.ts tests/adapters/adapter-input-media-guard.test.ts tests/providers/cursor/cursor-toolresult-normalize.test.ts tests/providers/ollama/ollama-native.test.ts tests/responses/chat-media-translation.test.ts tests/responses/parser-content-audio.test.ts tests/server/input-admission.test.ts tests/responses/responses-core-modules.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts, which gave 2045 pass / 0 fail (93 files).bun run test:changedran on the previous base, bddd61f, before the last rebase, which only added fix(codex): renew pool credit evidence, recheck predicted-reset hard locks, and scope Direct fallback to the locked main #7393 and touched none of these files: 44238 pass / 108 skip / 20 fail. It found two real failures, both fixed and covered by the focused run above: the DeepSeek window invariant and the core-module inventory. The other 18 do not come from this change:tests/cli/ocx-launcher-runtime.test.tsand others). They fail the same way on a branch that has no launcher changes, because this host runs from an external volume with group-writable directories.resolveCodexRuntime > treats missing persisted and resolved versions…fails the same way on cleanorigin/dev.dev, with the same singleresolveCodexRuntimefailure).client-connect.test.ts(Desktop copy coherence) hangs on this host under concurrent worktree load, and its source is untouched here.test:changedafter the final rebase, because the shared host test lock was queued behind other worktrees. CI covers it.--no-verify: this host's local pre-push hook runs the fullbun run test, which cannot pass here because of the environment-only launcher failures above and which competes with concurrent worktrees for the shared test lock. Its other steps (typecheck, privacy scan, GUI checks skipped because there are no GUI changes) passed separately.bun run testwas not run because of contention from concurrent worktrees on this host.Ratchet hot files touched:
src/adapters/openai-chat.tssrc/server/responses/request-transport.tssrc/adapters/google.tssrc/server/responses/passthrough-dispatch.tsstructure/providers/chat-compat.mdChecklist
Summary by CodeRabbit
New Features
zai-glm-5-3can receive image descriptions through the Vision sidecar.Documentation