Problem you're trying to solve
PR #252 added native support for the v1 surface (asst_xxxx IDs) via target.model: azure_ai/agents/<asst_id>, routed through LiteLLM's azure_ai/agents provider with AAD/SP/MI auth.
The newer v2 Foundry Agents API (UUID IDs, served at {project}/agents/{uuid}/threads/...) is not supported by that path. Current workarounds are
Proposed solution or behavior
A small native target type for v2 hosted agents that mirrors the shape of target.endpoint: single config field, no callable wrapper, AAD via the same azure_auth helper this PR introduced. Tentative YAML shape (open to alternatives):
target:
foundry_agent:
project_endpoint: https://<resource>.services.ai.azure.com/api/projects/<project>
agent_id: <uuid>
Runtime would build a session class similar to HTTPEndpointSession that speaks the v2 REST protocol (create thread, post message, create run, poll, read messages) using azure_auth.get_azure_token_provider(AZURE_FOUNDRY_SCOPE) for auth.
Alternatives considered
No response
Use case context
No response
Acknowledgements
Problem you're trying to solve
PR #252 added native support for the v1 surface (asst_xxxx IDs) via
target.model: azure_ai/agents/<asst_id>, routed through LiteLLM'sazure_ai/agentsprovider with AAD/SP/MI auth.The newer v2 Foundry Agents API (UUID IDs, served at
{project}/agents/{uuid}/threads/...) is not supported by that path. Current workarounds aretarget.callablewrapper in PR Add LangGraph Foundry hosted-agent example with Adaptive Eval #250: user writes ~50 lines of glue per agentProposed solution or behavior
A small native target type for v2 hosted agents that mirrors the shape of
target.endpoint: single config field, no callable wrapper, AAD via the same azure_auth helper this PR introduced. Tentative YAML shape (open to alternatives):Runtime would build a session class similar to
HTTPEndpointSessionthat speaks the v2 REST protocol (create thread, post message, create run, poll, read messages) usingazure_auth.get_azure_token_provider(AZURE_FOUNDRY_SCOPE)for auth.Alternatives considered
No response
Use case context
No response
Acknowledgements