[azure.ai.agents] maxOutputTokens is silently dropped for prompt agents (kind: prompt)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- azure, go
调研方向
从 cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go 开始,追踪 CreatePromptAgentAPIRequest 如何映射 Temperature 和 TopP 等提示字段。检查提示代理定义以及现有的映射测试(如果有)。当 maxOutputTokens: 4000 在提示代理的已部署定义中得到保留,或者 CLI 明确拒绝不支持的字段时,即为完成。
由索引模型根据 Issue 内容生成。
描述
Output from azd version
azd version 1.37.3
azure.ai.agents 1.0.0 (relevant code unchanged in 1.1.0 and on main at 3b30d4a)
Describe the bug
When a kind: prompt service in azure.yaml sets maxOutputTokens, azd deploy succeeds but the deployed agent version has max_output_tokens: null. The value is dropped without a warning or error.
CreatePromptAgentAPIRequest in cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go copies Temperature, TopP, Text, Reasoning, Tools, ToolChoice and StructuredInputs into the prompt definition, but not MaxOutputTokens. MaxOutputTokens is only mapped for voice agents, and definitionOverlay only applies to voice agents, so there is no workaround inside azd.
To Reproduce
-
azure.yaml:name: repro services: repro-agent: host: azure.ai.agent kind: prompt name: repro-agent model: <model deployment> instructions: You are a test agent. reasoning: effort: low maxOutputTokens: 4000 -
azd deploy repro-agent --no-prompt(withAZURE_SUBSCRIPTION_ID,AZURE_RESOURCE_GROUPand the project endpoint set in the azd environment). -
Read the agent back:
GET {project_endpoint}/agents/repro-agent?api-version=v1. -
Model, instructions, reasoning and tools are applied, but
versions.latest.definition.max_output_tokensisnull.
Expected behavior
max_output_tokens is 4000 in the deployed definition, or azd fails with a clear error saying the field isn't supported for prompt agents.
Environment
- azd 1.37.3,
azure.ai.agents1.0.0, Linux GitHub Actions runner (ubuntu) - Microsoft Foundry project, agents API
api-version=v1 - IDE: not applicable (CI)
Additional context
The Foundry agents API accepts max_output_tokens in a prompt agent's definition and stores it. Prompt agents we create by calling the API directly all read back with max_output_tokens: 4000. We use it as a per-agent output limit. If we deploy the same agents with azd, the limit disappears, the deployment still reports success, and the deployed agent no longer matches the declared configuration.
Requests:
- Map
maxOutputTokensforkind: prompt, the same way azd mapstemperatureandtopP. - Separately, fail or warn when a declared field can't be applied to the agent kind, rather than dropping it.
- If
max_output_tokensisn't meant to be supported on prompt agents, say so in the prompt-agent definition docs and have azd reject the field forkind: prompt. (PromptAgentDefinitionin the REST reference and in azure-ai-projects 2.10.0 doesn't list it today, although the service stores it.)
- 主要语言
- Go
- 星标
- 573
- 派生
- 387
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 196
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/azure-dev 的其他 Issue
-
[Issue] azd deploy fails with "multiple Azure Bots are bound to the same MsaAppID" because botServices list API returns duplicate entries可能重新可做 关联的 PR 已关闭且未合并。 未关闭agentic bug customer-reported ext-agents
难度 2/5 1-3 小时 新手友好度 70/100
Azure/azure-dev#10333 · 1 条评论 ·
维护者通常 1 天内回复
-
area/docs area/environment area/public-docs engineering item
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Bundle the evaluations and dataset extensions in the Foundry meta-package可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
Map invocation lifecycle files to CLI regression scenarios可能重新可做 关联的 PR 已关闭且未合并。 未关闭area/docs engineering item ext-agents test automation
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
enhancement ext-agents
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
0.kind: bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Judgment-Pack/judgment-pack-runtime#390 ·
维护者通常 1 天内回复
-
triage/needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
cozystack/cozystack#5300 · 1 个 reaction ·
维护者通常 2 天内回复
-
bug go
难度 2/5 1-3 小时 新手友好度 82/100
teradata-labs/loom#665 ·
维护者通常 1 天内回复
-
Improve DB UI未关闭enhancement ui/ux
难度 2/5 1-3 小时 新手友好度 64/100
jbigler/railswitch#222 ·
维护者通常 1 天内回复