Files
crewAI/lib
Devin AI f4fa90dc04 feat: add Responses API support for Azure OpenAI provider
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>
2026-03-20 07:22:40 +00:00
..