Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/testdata/cassettes/TestA2AServer_MultiAgent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interactions:
proto_minor: 1
content_length: 0
host: api.openai.com
body: '{"input":[{"content":[{"text":"You are a multi-agent system, make sure to answer the user query in the most helpful way possible. You have access to these sub-agents:\nName: web | Description: \n\nIMPORTANT: You can ONLY transfer tasks to the agents listed above using their ID. The valid agent names are: web. You MUST NOT attempt to transfer to any other agent IDs - doing so will cause system errors.\n\nIf you are the best to answer the question according to your description, you can answer it.\n\nIf another agent is better for answering the question according to its description, call `transfer_task` function to transfer the question to that agent using the agent''s ID. When transferring, do not generate any text other than the function call.\n\n","type":"input_text"}],"role":"system"},{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"Say hello.","role":"user"}],"model":"gpt-5-mini","tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"name":"transfer_task","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","type":"function"}],"stream":true}'
body: '{"input":[{"content":[{"text":"You are a multi-agent system, make sure to answer the user query in the most helpful way possible. You have access to these sub-agents:\nName: web | Description: \n\nIMPORTANT: You can ONLY transfer tasks to the agents listed above using their ID. The valid agent names are: web. You MUST NOT attempt to transfer to any other agent IDs - doing so will cause system errors.\n\nIf you are the best to answer the question according to your description, you can answer it.\n\nIf another agent is better for answering the question according to its description, call `transfer_task` function to transfer the question to that agent using the agent''s ID. When transferring, do not generate any text other than the function call.\n\n","type":"input_text"}],"role":"system"},{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"Say hello.","role":"user"}],"model":"gpt-5-mini","tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"name":"transfer_task","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","type":"function"},{"strict":true,"parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the sub-agent to run in the background.","type":"string"},"expected_output":{"description":"The expected output from the agent (optional).","type":["string","null"]},"task":{"description":"A clear and concise description of the task the agent should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"name":"run_background_agent","description":"Start a sub-agent task in the background and return immediately with a task ID.\nUse this to dispatch work to multiple sub-agents concurrently. The sub-agent runs with all tools\npre-approved — use only with trusted sub-agents and well-scoped tasks. Check progress with\nview_background_agent and collect results once the task is complete.","type":"function"},{"strict":true,"parameters":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"list_background_agents","description":"List all background agent tasks with their status and runtime.","type":"function"},{"strict":true,"parameters":{"additionalProperties":false,"properties":{"task_id":{"description":"The ID of the background agent task to view.","type":"string"}},"required":["task_id"],"type":"object"},"name":"view_background_agent","description":"View the output and status of a specific background agent task by task ID. Returns live buffered output if still running, or the final result if complete.","type":"function"},{"strict":true,"parameters":{"additionalProperties":false,"properties":{"task_id":{"description":"The ID of the background agent task to stop.","type":"string"}},"required":["task_id"],"type":"object"},"name":"stop_background_agent","description":"Stop a running background agent task by task ID.","type":"function"}],"stream":true}'
url: https://api.openai.com/v1/responses
method: POST
response:
Expand Down
2 changes: 1 addition & 1 deletion pkg/runtime/model_switcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (r *LocalRuntime) AvailableModels(ctx context.Context) []ModelChoice {
// Get the current agent's default model reference
currentAgentDefault := ""
if r.modelSwitcherCfg.AgentDefaultModels != nil {
currentAgentDefault = r.modelSwitcherCfg.AgentDefaultModels[r.currentAgent]
currentAgentDefault = r.modelSwitcherCfg.AgentDefaultModels[r.CurrentAgentName()]
}

var choices []ModelChoice
Expand Down
Loading