Repository navigation
Description
Summary
Chat offers models that cannot take tools, and every chat message sent to one fails. Chat always offers its tools (knowledge search at least), and OpenRouter routes a request with tools to no endpoint of a model whose listing names no tools parameter: it answers 404 before the model sees a word. Tale then shows "The selected model was not found on openrouter. It may have been renamed or removed.", which sends the reader the wrong way.
#5062 removes the image generators among these models (Gemini 2.5 Flash Image, GPT-5 Image Mini and the like) from the chat model lists, because a person who wants a picture reaches for them and the picture comes from the image model anyway. The text models below stay listed and keep failing; this issue is about them.
What main does today (at 1ea59abe9)
- Every chat turn offers the retrieval tools, joined by the work tools:
services/platform/backend/core/chat/turn_action.ts:1546(tools: composeToolExecutors([retrievalTools, workTools?.executor]));rag_searchis the first retrieval tool (services/platform/lib/chat/tools.ts:32). - The chat model lists take every entry tagged
chat:services/platform/backend/core/chat/composer.ts:151; an explicit model reference takes the same set:services/platform/backend/core/lib/providers/resolve_model.ts:96. supportsToolsis true when a listing namestoolsortool_choiceamongsupported_parameters, or when the entry is bare (no window, no parameters):services/platform/lib/shared/providers/catalog_normalize.ts:256-260.- The Auto pick prefers tool-capable models but treats tool support as a soft filter, because "every plain OpenAI-compatible
/modelslisting" was assumed to declare no tools at all:services/platform/lib/chat/model-choice.ts:22-30,:140-146. - A provider's 404 is classified
model_not_foundwhatever its text:services/platform/lib/shared/chat-errors.ts:320-326; the hint readserrorHintModelNotFoundNamed(services/platform/messages/en/chat.yml:526).
What was observed (2026-10-28, local dev stack at 1ea59abe9, one OpenRouter credential)
- Phi 4 (
microsoft/phi-4) chosen in the chat composer, message "Say hello in one word.": the reply failed withThe model provider answered 404: {"error":{"message":"No endpoints found that support tool use. Try disabling \"rag_search\". …","code":404,"metadata":{"routing_funnel":[{"step":"Initial Endpoints","endpoint_count":1}],"failed_routing_step":"Filter by Tool Compatibility"}}}, stored asmodel_not_found. - The same message on Gemini 2.5 Flash Image failed identically (the case fix(platform): keep tool-less image models out of chat model lists #5062 closes).
- The composer listing held 464 models, 67 of them with
tools: false, all from OpenRouter. Among them:perplexity/sonar,perplexity/sonar-pro,perplexity/sonar-deep-research,openai/o1-pro,microsoft/phi-4,google/gemma-3-4b-it,cohere/command-a,mistralai/mistral-small-24b-instruct-2501,x-ai/grok-4.20-multi-agent,meta-llama/llama-3.2-3b-instruct,qwen/qwen-2.5-coder-32b-instruct. - The chosen model is remembered: new chats start on it until the person picks another.
- Where
supportsTools: falsecomes from, by catalog source:staticcatalogs set it by hand; one chat model ships without tools,grok-4.20-multi-agent(configs/platform/system/models/xai/models.yml).openrouter-api: OpenRouter publishessupported_parametersfor every model, and its router refuses tools whentoolsis missing (the 404 above).models-endpoint: Vercel AI Gateway's/v1/modelsnow publishessupported_parametersfor all 320 language models (302 nametools). A custom provider's listing may publish a context window withoutsupported_parameters, and then every entry readssupportsTools: falsewhile tools may well work.none(allowlist): alwaystrue.
Not examined: how direct providers other than OpenRouter answer tools sent to a model without them (xAI for grok-4.20-multi-agent), and whether any custom provider in use today lists a window without parameters.
Constraints
- A model that takes tools must keep every tool; chat's knowledge search is how answers cite sources.
- A custom provider whose listing cannot say whether a model takes tools must not lose its models from the picker.
- The model endpoints for API keys relay a caller's own request, with or without tools, from the same listing.
- No silent fallback to another model (
Tale does not silently switch providers, chat basics docs).
Options
- Leave such models out of the chat lists where the listing states tool support. OpenRouter and static entries are authoritative;
models-endpointentries only when the listing publishessupported_parameters. Needs the catalog to record whether the fact was stated (todayfalsemeans both "no tools" and "not said"). - Answer without tools. The turn runs on the model with no tools offered: no knowledge search, no files, no images, and the reply says so. Sonar would still search the web on its own.
- Keep listing them and refuse up front. The picker marks them, and a message to one is refused before the provider call with a sentence that names the reason.
- Only fix the message. Classify the provider's "No endpoints found that support tool use" as its own error with a hint to pick another model, leaving the lists as they are.
Questions
- Is a chat reply without knowledge search acceptable for some models (Sonar), or should chat only ever run with its tools?
- Should the model endpoints for API keys keep listing models that take no tools?
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Chat lists and accepts only models that can take its tools. The rule applies only where the listing actually says whether a model takes tools. A provider error that says the model takes no tools also gets its own message. This is Option 1 plus Option 4. Option 3 is kept only as the refusal for explicit references, and Option 2 is rejected.
Rule
toolSupportStatedflag. Model options carry it astoolsStated. It is true for any listing that publishessupported_parameters(OpenRouter, Vercel), for static catalog entries, and for entries matched to Tale's shipped catalogs. It is false for custom listings without parameters and for allowlist entries. A catalog cached before this change has no flag and stays listed.relaysChatRequests: today's rule, which leaves out tool-less media generators.answersChatTurns: that rule, plus leaving out an entry whose listing says it takes no tools.CHAT_MODEL_TOOLS_UNSUPPORTED(400). The message names the model and the reason.model_no_tools, matched ahead of the 404 →model_not_foundbranch. Its hint, in every shipped locale, says the model can't use the tools chat needs and asks the reader to pick another model. Auto does not retry it.Questions
Rationale
Offering a model that fails every message is the bug, and chat's tools are not optional. The fix has to tell "no tools" apart from "not said", or custom providers whose listings carry no parameters would lose their models. The chat lists and the API list share one projection today, so the filter is split into a relay predicate and a chat predicate. Otherwise the API either loses these models, or the standard agent and pack fallbacks quietly receive them. The better error message covers what no listing reveals.
Implementation units (all on
main)CHAT_MODEL_TOOLS_UNSUPPORTED, a new spec rule CHAT-R51, docs and a manual-test box (M; depends on 1).model_no_tools, with hints in every shipped locale (S; independent).