[azure.ai.agents] maxOutputTokens is silently dropped for prompt agents (kind: prompt)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, go
- Lĩnh vực
- backend-api-design, cli
Hướng nghiên cứu
Bắt đầu với cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go và theo dõi cách CreatePromptAgentAPIRequest ánh xạ các trường prompt như Temperature và TopP. Kiểm tra định nghĩa tác nhân prompt và các bài kiểm thử ánh xạ hiện có, nếu có. Công việc hoàn tất khi maxOutputTokens: 4000 được giữ nguyên trong định nghĩa đã triển khai của tác nhân prompt hoặc CLI từ chối rõ ràng trường không được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.)
- Ngôn ngữ chính
- Go
- Star
- 573
- Fork
- 387
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 196
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-dev
-
[Issue] azd deploy fails with "multiple Azure Bots are bound to the same MsaAppID" because botServices list API returns duplicate entriesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởagentic bug customer-reported ext-agents
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Azure/azure-dev#10333 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/docs area/environment area/public-docs engineering item
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bundle the evaluations and dataset extensions in the Foundry meta-packageCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Map invocation lifecycle files to CLI regression scenariosCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởarea/docs engineering item ext-agents test automation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ext-agents
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/azure-dev
Issue tương tự
-
0.kind: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated-triage type/bug type/ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
hashicorp/terraform-provider-google#30678 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:s impact:low raised-by:worker risk:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
medici-finance/assay#6323 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
ethereum-optimism/optimism#24120 ·
Maintainer thường phản hồi trong vòng 1 ngày