[BUG] Native Azure provider ignores timeout and max_retries on the completions path

オープン
#9,880 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Nezar-Alhammadi がすでに取り組んでいます。

2026年11月27日 から。

  • #9881 @Nezar-Alhammadi による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
azure, python
領域
backend

調査の方向性

Find AzureCompletion._make_client_kwargs() and compare the default completions path with the responses path, which already forwards these settings. Check the sync and async client construction and related tests for retry and timeout configuration. Done when both completions clients receive the expected retry and timeout values; linked pull request #9881 indicates work is already underway.

索引モデルが issue の本文から書いたものです。

説明

Description

LLM(model="azure/...", timeout=..., max_retries=...) accepts timeout and max_retries on AzureCompletion (and exports both in to_config_dict() and forwards them when api="responses"), but on the default api="completions" path _make_client_kwargs() never passes either setting to ChatCompletionsClient or AsyncChatCompletionsClient.

As a result:

  • max_retries (including max_retries=0 to disable SDK retries or a higher count like max_retries=5) is ignored, and both sync and async Azure clients always use azure-core's default total_retries=3 (even differing from AzureCompletion's own max_retries: int = 2 field default).
  • timeout is ignored, leaving connection_timeout and read_timeout at the 300s SDK defaults.

Minimal Reproduction

from crewai import LLM

llm = LLM(
    model="azure/gpt-4o",
    api_key="test-key",
    endpoint="https://example.openai.azure.com",
    timeout=15.0,
    max_retries=0,
)

sync_client = llm._get_sync_client()
print("total_retries:", sync_client._config.retry_policy.total_retries)  # 3 instead of 0
print("read_timeout:", sync_client._client._pipeline._transport.connection_config.read_timeout)  # 300 instead of 15.0

Expected Behavior

_make_client_kwargs() passes retry_total=self.max_retries and, when self.timeout is not None, connection_timeout=self.timeout and read_timeout=self.timeout so both the sync and async Azure AI Inference clients honor the configured retry and timeout settings.

主要言語
Python
スター
61.2k
フォーク
9.2k
平均マージ
1日 14時間
マージ済み PR(30日)
180

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crewAIInc/crewAI のほかの issue

crewAIInc/crewAI の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。