Skip to content

[BUG] Agent tool hides that an agent file's model overrides a task's model and reports an unserved one only after dispatch #1939

Closed

Description

@edenreich

Summary

A chat asked to message a Markdown agent whose frontmatter pins a model the gateway does not serve (model: mock/openai/gpt-4o, left behind by an example run in mock mode). Three things made that hard to see and impossible to fix from the chat:

  1. The Agent tool reported Status: Success at dispatch, and the subagent failed only afterwards with opening the subagent's thread: model "mock/openai/gpt-4o" not available. Available: [...]. The list was every model the gateway serves, about forty of them, and the error never says the model came from the agent's file.
  2. The calling agent retried with an explicit model: anthropic/claude-haiku-5-5. The tool accepted it but ran the pinned model again - by design, docs/subagents.md says the file's model wins over a task's model - yet nothing in the result said the argument was dropped, and resolveModel's comment claims the opposite. The calling agent then told the user the subagent ran on Haiku.
  3. With both retries failing the same way, the calling agent invented a stand-in agent to deliver the message.

Steps to Reproduce

  1. Put an agent in ~/.infer/agents/tester.md with model: mock/openai/gpt-4o in its frontmatter, outside mock mode.
  2. In a chat, ask: "Can you send a message to the tester agent? this is a test."
  3. The model calls Agent with agent: tester - the call succeeds, then [Subagent Failed: tester] arrives with the full model list.
  4. Ask it to retry with another model - it calls Agent with agent: tester and model: anthropic/claude-haiku-5-5, which fails identically.

Expected Behavior

The file's model keeps winning over a task's model, as docs/subagents.md documents. What changes is that the rule becomes visible:

  • A task whose model the gateway does not serve fails the Agent call itself, before anything is dispatched. For a model pinned by an agent file, the error names the agent and its file and says a task's model cannot override it, so the fix is to edit the file.
  • When an agent file's model replaces an explicit task model, the tool result says so instead of dropping it silently.

Actual Behavior

  • The explicit model is dropped without a word.
  • The call reports success, the subagent fails later, and the error lists every gateway model without saying where the unserved one came from.

Activity

  1. added
    bug
    on Nov 22, 2026
  2. added theissue type on Nov 22, 2026
  3. moved this from Todo to In progress in 2026on Nov 22, 2026
  4. changed the title [-][BUG] Agent tool drops an explicit model for a named agent and reports an unserved pinned model only after dispatch[/-] [+][BUG] Agent tool hides that an agent file's model overrides a task's model and reports an unserved one only after dispatch[/+] on Nov 22, 2026
  5. moved this from In progress to QA in 2026on Nov 22, 2026
  6. inference-gateway-releaser commented on Nov 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.266.2 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  7. moved this from QA to Done in 2026on Nov 23, 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

    bugreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions