Repository navigation
fix(platform): keep tool-less image models out of chat model lists - #5062
Merged
Merged
Conversation
Picking Gemini 2.5 Flash Image in the chat composer failed every message with OpenRouter's 404 "No endpoints found that support tool use. Try disabling rag_search": a listing tags an image generator that also writes text `chat`, the composer offered it, and every chat turn offers its tools, knowledge search at least. The failure then read as a model renamed or removed. One boundary now decides what a turn can be sent to: a `chat` model that is no image generator taking no tools. The composer's listing, and with it every governed chat model listing, the explicit model references of chat and agent turns, and the Default models rule dialog use it. An image generator that takes tools, such as Gemini 3 Pro Image or OpenRouter's Auto Router, stays. A saved pick that is no longer listed falls back to Auto.
yannickmonney
enabled auto-merge
October 28, 2026 09:48
yannickmonney
added this pull request to the merge queue
Oct 28, 2026
yannickmonney
added a commit
that referenced
this pull request
Oct 28, 2026
The authored notes for v0.5.94: everything since v0.5.93 (1ea59ab), which is #5062 and #5064. Highlights: a custom provider in front of an LLM gateway (the base URL sentence, the facts of the gateway's models, chat titles, labels and search), Claude Sonnet 5.5 on the Anthropic provider, and image models without tools leaving the chat model lists. Upgrade notes: no migration, the API contract unchanged at 3.49.0, what changes for an organization with such a gateway, Auto skipping zero-output-price models, the title's larger budget for a model that thinks, and the pins #5062 refuses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Choosing Gemini 2.5 Flash Image in the chat composer, the way someone who wants a picture would, failed every message:
An OpenRouter listing tags an image generator that also writes text
chat, so the composer offered it (Gemini 2.5 Flash Image, Gemini 3 Pro Image Preview, Gemini 3.1 Flash Image, GPT-5 Image, GPT-5 Image Mini, GPT-5.4 Image 2, and the Lyria music models). Every chat turn offers its tools, knowledge search at least, and OpenRouter routes a request with tools to no endpoint of a model without them. The reply then read "The selected model was not found on openrouter. It may have been renamed or removed.", and the pick carried over into every new chat. The picture itself comes from the organization's image model through the image tool, whatever the chat model is.What
answersChatTurns(lib/shared/providers/chat_turn_models.ts): a turn can be sent to an entry taggedchatthat is no image generator taking no tools. A generator that takes tools (Gemini 3 Pro Image, Nano Banana 2.1, OpenRouter's Auto Router) still answers a turn; Gemini 3 Pro Image answered "Hello." in the local run.collectComposerOptions) uses it, and with it every governed chat model listing: the chat picker, the agent pickers, the standard agent, automation defaults,GET /api/v1/models, and the model endpoints for API keys.resolveModel) and an agent's serving (findChatModel) refuse such a model the way they refuse an STT entry.supportsToolsandoutputsMediafor it.withDefaultModel).CHAT-F79, with its automation row.Not in scope: OpenRouter text models without tool support (Phi 4, Sonar, o1-pro, Gemma, …) are still listed and fail the same way. Fixing them needs a decision (hide them, or answer without tools), so it is filed as #5063.
Verification
chat_turn_models.test.ts(OpenRouter listing rows normalized as the catalog reads them),composer.test.ts,resolve_model.test.ts,agent_serving.test.tsanddefault-model-editor.test.tsx; each fails without the fix and passes with it.bun run testof the platform's server and pii projects: 1,492 files, 90,438 tests passed. Governance UI tests: 57 files, 716 tests. Docs service tests: 716. Typecheck of the platform,lint:manual,lint:links,oxfmt --checkand oxlint on the changed files: clean.