mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-08 12:08:15 +00:00
When api='responses' is specified for Azure, creates an internal OpenAICompletion instance configured with AzureOpenAI/AsyncAzureOpenAI clients from the openai Python SDK, which natively supports the Responses API on Azure. Key changes: - Extended AzureCompletion.__init__() with Responses API parameters (api, instructions, store, previous_response_id, include, builtin_tools, parse_tool_outputs, auto_chain, auto_chain_reasoning, seed, reasoning_effort, max_completion_tokens) - Added _init_responses_delegate() method using composition/delegation - Added delegation logic in call() and acall() methods - Added pass-through properties: last_response_id, last_reasoning_items - Added pass-through methods: reset_chain(), reset_reasoning_chain() - Preserved base endpoint before validation for Azure client config - Interceptors now allowed in responses mode (via OpenAI SDK) - Added AZURE_RESPONSES_API_VERSION constant (2025-03-01-preview) - Added 30+ comprehensive tests covering all new functionality Closes #4974 Co-Authored-By: João <joao@crewai.com>