Skip to content

Bug: chat offers OpenRouter models that take no tools, and every message to one fails #5063

Open

Description

@yannickmonney

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_search is 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.
  • supportsTools is true when a listing names tools or tool_choice among supported_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 /models listing" 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_found whatever its text: services/platform/lib/shared/chat-errors.ts:320-326; the hint reads errorHintModelNotFoundNamed (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 with The 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 as model_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: false comes from, by catalog source:
    • static catalogs 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 publishes supported_parameters for every model, and its router refuses tools when tools is missing (the 404 above).
    • models-endpoint: Vercel AI Gateway's /v1/models now publishes supported_parameters for all 320 language models (302 name tools). A custom provider's listing may publish a context window without supported_parameters, and then every entry reads supportsTools: false while tools may well work.
    • none (allowlist): always true.

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

  1. Leave such models out of the chat lists where the listing states tool support. OpenRouter and static entries are authoritative; models-endpoint entries only when the listing publishes supported_parameters. Needs the catalog to record whether the fact was stated (today false means both "no tools" and "not said").
  2. 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.
  3. 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.
  4. 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

  1. added
    needs discussion
    bug
    service: platform
    on Oct 28, 2026
  2. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    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

    • The catalog records whether a listing said if a model takes tools, with a new toolSupportStated flag. Model options carry it as toolsStated. It is true for any listing that publishes supported_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.
    • There are two predicates:
      • 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.
    • The shared model projection uses the first. Every chat caller applies the second: the composer picker, Auto, explicit references, agent serving and pinned agents, the standard agent's model choice, a pack's fallback model, title generation, and the settings pickers. Only the model endpoints for API keys read the projection without the new clause.
    • A model whose listing does not say stays listed, and chat offers it every tool, as today.
    • An explicit reference to a listed model that takes no tools (REST, an agent or automation pin, a settings save) is refused before anything is saved, with CHAT_MODEL_TOOLS_UNSUPPORTED (400). The message names the model and the reason.
    • Chat never runs a turn without its tools and never switches models silently. A remembered composer pick that is no longer listed falls back as it does today. A pinned agent is refused with the reason and is not swapped.
    • The model endpoints for API keys keep listing these models. They refuse a request that carries tools only when the listing says the model takes none.
    • Backstop: "No endpoints found that support tool use" and similar provider errors become a new chat error, model_no_tools, matched ahead of the 404 → model_not_found branch. 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

    • Is a chat reply without knowledge search acceptable for some models (Sonar)? No. Chat always runs with the tools the organization allows (CHAT-R18). A program can still call Sonar raw through the model endpoints for API keys.
    • Should the model endpoints for API keys keep listing models that take no tools? Yes. They relay the caller's own request, and requests without tools work. A request that carries tools is refused up front only when the listing says the model takes none.

    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)

    1. Catalog records whether tool support was stated (S).
    2. Chat offers and accepts only models that take tools or whose listing does not say. This unit splits the predicates and applies the chat predicate at every chat caller, including the standard agent and pinned agents. It adds CHAT_MODEL_TOOLS_UNSUPPORTED, a new spec rule CHAT-R51, docs and a manual-test box (M; depends on 1).
    3. The model endpoints for API keys refuse tools only when the listing says the model takes none (S; depends on 1 and 2).
    4. Classify a provider's "model takes no tools" refusal as model_no_tools, with hints in every shipped locale (S; independent).
  3. added
    agent-ready
    and removed
    needs discussion
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions