Skip to content

fix(platform): keep tool-less image models out of chat model lists - #5062

Merged
yannickmonney merged 1 commit into
mainfrom
fix/chat-image-models
Oct 28, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/chat-image-models

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

Choosing Gemini 2.5 Flash Image in the chat composer, the way someone who wants a picture would, failed every message:

The model provider answered 404: {"error":{"message":"No endpoints found that support tool use. Try disabling \"rag_search\". …","routing_funnel":[{"step":"Initial Endpoints","endpoint_count":1}],"failed_routing_step":"Filter by Tool Compatibility"}}

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 tagged chat that 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.
  • The composer's projection (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.
  • Explicit references use it too: a chat turn's model (resolveModel) and an agent's serving (findChatModel) refuse such a model the way they refuse an STT entry.
  • The Default models rule dialog filters its model list the same way; the governance catalog hook now carries supportsTools and outputsMedia for it.
  • A saved composer pick that is no longer listed already falls back to Auto (withDefaultModel).
  • Docs (EN/DE/FR): the chat model picker paragraph and the Default models section say why image models are not listed and where the image model is chosen. Manual box 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

  • New regression tests in chat_turn_models.test.ts (OpenRouter listing rows normalized as the catalog reads them), composer.test.ts, resolve_model.test.ts, agent_serving.test.ts and default-model-editor.test.tsx; each fails without the fix and passes with it.
  • bun run test of 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 --check and oxlint on the changed files: clean.
  • Local stack with an OpenRouter credential: before, the composer listed 464 models and a message on Gemini 2.5 Flash Image (and on Phi 4) failed with the 404 above; after, it lists 454, a search for "image" shows only Gemini 3 Pro Image, the Default models dialog shows the same, and with the image model pinned to GPT Image 2.5 Sunburst a chat on Auto delivered a 1536×1024 picture (USD 0.0105 booked).

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
yannickmonney added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 4820083 Oct 28, 2026
63 checks passed
@yannickmonney
yannickmonney deleted the fix/chat-image-models branch October 28, 2026 10:09
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.
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