Skip to content

Commit 17af169

Browse files
[agentserver] core: send Foundry-Features header on task-store requests
The Foundry Task Storage API requires opt-in to the 'Routines=V1Preview' preview feature via the 'Foundry-Features' header. Without it the server returns HTTP 403 with: {"error":{"code":"preview_feature_required", "message":"This operation requires the following opt-in preview feature(s): Routines=V1Preview. Include the 'Foundry-Features: Routines=V1Preview' header in your request."}} Wired into the HostedTaskProvider's HeadersPolicy as a base header so every task-store request (GET/POST/PATCH/DELETE/list) carries it. Discovered while running the durable-agent-demo against a fresh deployment of the spec 016 transport refactor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a2c9a1f commit 17af169

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/durable

sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/durable/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def _build_default_policies(
331331
"""
332332
return [
333333
RequestIdPolicy(),
334-
HeadersPolicy(),
334+
HeadersPolicy(base_headers={"Foundry-Features": "Routines=V1Preview"}),
335335
UserAgentPolicy(base_user_agent=_USER_AGENT),
336336
# Retry on 5xx and the standard transient HTTP statuses; 409
337337
# is explicitly NOT in retry_on_status_codes (FR-030) because

0 commit comments

Comments
 (0)