Skip to content

fix(agents): change an agent chat's model from the top bar - #446

Closed
edenreich wants to merge 1 commit into
mainfrom
fix/agent-model-top-bar
Closed

edenreich wants to merge 1 commit into
mainfrom
fix/agent-model-top-bar

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

In an agent chat, the top-bar model picker could not change the model. agentThreadModel runs an agent chat on the agent's front-matter model, but <select id="model-select"> showed and set only the global model, so a pick there was silently ignored. In an agent chat the picker now shows the model the chat actually runs on, and picking another one saves it to the agent's front matter, the same as Edit agent. Outside agent chats nothing changes.

Changes

  • frontend/store.tsx: setAgentModel(agent, model) saves the agent with the new model and reloads the agent list. It does not use saveAgent, which also opens a fresh chat.
  • frontend/components/ModelSelect.tsx: value is agentThreadModel(agent, model). onChange pins the agent's model in an agent chat and keeps setModel otherwise. It is still the native <select>.
  • frontend/components/AgentEditor.tsx: a stored model the gateway does not list (a bare alias like sonnet, a delisted model) stays visible as its own option instead of reading as "Inherit the selected model".

The model rule itself is unchanged and stays covered by frontend/lib/agents.test.ts. The e2e harness has no select step, so this is checked by hand in mock mode.

@edenreich
edenreich marked this pull request as ready for review November 7, 2026 14:36
@edenreich

Copy link
Copy Markdown
Contributor Author

Closing: the model belongs to the agent, not to a top-bar pick. The fix moves to the CLI - a chat opened as a named Markdown agent runs on its front-matter model (fixed), body and tools - with a desktop follow-up that opens agent chats by name and shows the agent's model read-only. Issues to follow.

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.55.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 7, 2026
@edenreich
edenreich deleted the fix/agent-model-top-bar branch November 9, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant