`uses_openai` gateway prefix is unreachable since any-llm retired the `gateway` provider
@cyyecao-lappland がすでに取り組んでいます。
2026年10月2日 から。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- api, backend, backend-api-design
調査の方向性
Start in tinyagent/agent.py with the provider parsing and AnyLLM.create flow. Reproduce the documented otari:openai and otari:anthropic cases, then settle whether the outer otari provider or inner provider should be instantiated. Done means gateway-prefixed model IDs no longer fail and the chosen routing preserves the intended uses_openai behavior.
索引モデルが issue の本文から書いたものです。
説明
tinyagent/agent.py strips a gateway: prefix before computing uses_openai:
provider_name, model_id = AnyLLM.split_model_provider(self.config.model_id)
if provider_name == "gateway":
provider_name, model_id = AnyLLM.split_model_provider(model_id)
self.uses_openai = provider_name == LLMProvider.OPENAI
That branch can no longer run. any-llm migrated the gateway provider to otari (mozilla-ai/any-llm#1089) and then removed the gateway provider along with the GATEWAY value of the LLMProvider enum (mozilla-ai/any-llm#1122, merged 2026-06-12). split_model_provider raises on the first call, before the check is reached:
>>> AnyLLM.split_model_provider("gateway:openai:gpt-4.1-mini")
any_llm.exceptions.UnsupportedProviderError: 'gateway' is not a supported provider
any-llm kept the legacy GATEWAY_API_KEY and GATEWAY_API_BASE env vars inside the otari provider as the migration path, but deliberately did not keep a provider-name alias. So every gateway: model id has been broken since 2026-06-12.
Renaming the sentinel to otari restores the original semantics:
otari:openai:gpt-4.1-mini -> uses_openai True
otari:anthropic:claude-3 -> uses_openai False
One design question is worth settling before that. The strip reassigns provider_name, which then flows into AnyLLM.create(provider_name, ...), so gateway:openai:gpt-4 built a plain OpenAI client and never instantiated the gateway provider at all; reaching the gateway required also passing api_base. That was reasonable when gateway was a thin OpenAI-compatible wrapper. OtariProvider is now a real SDK-backed provider with native /messages pass-through, batch support and cache_control preservation, so a straight rename would keep bypassing it.
Should otari:openai:gpt-4 route through OtariProvider, or keep resolving to the inner provider with the caller supplying api_base? That decides whether this is a one-word change or a behavior fix.
For context, any-agent has dropped its gateway: test coverage in mozilla-ai/any-agent#954, since the behavior lives here and otari: cannot stand in there without taking the otari SDK as a dependency.
Note: this issue was drafted by Claude Opus 5 via back-and-forth with @njbrake. The reasoning and decisions are his; the prose is Claude's.
- 主要言語
- Python
- スター
- 33
- フォーク
- 7
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mozilla-ai/tinyagent のほかの issue
-
Running an agent mutates the caller-provided message list対応中かも @cyyecao-lappland が 23 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
mozilla-ai/tinyagent#27 ·
-
Add Python 3.14 support対応中かも @barredterra が 124 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
mozilla-ai/tinyagent#16 ·
-
Invalid JSON tool arguments abort the run or prematurely return a final-answer error対応中かも @cyyecao-lappland が 23 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
mozilla-ai/tinyagent#29 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
mozilla-ai/tinyagent#24 ·
-
`import tinyagent` raises NameError with mcp >= 2.0対応中かも @tonycoder-hub が 27 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
mozilla-ai/tinyagent#22 ·
mozilla-ai/tinyagent の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
GoogleCloudPlatform/gce-rescue#195 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
intake mcp-intake needs-ac needs-human-review priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Ikalus1988/MisakaNet#3848 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug size:XS
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信