[Bug]: Changing an LLM provider's context breaks its LLM proxies (404) until each proxy is redeployed

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

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

まだ誰も着手していません。

評価

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

調査の方向性

Start with gateway/gateway-controller/pkg/utils/llm_transformer.go near line 209, where the provider context is copied into a proxy's loopback upstream, and trace how provider deployments update routes. Reproduce the issue using the listed provider and proxy API steps, then check whether the proxy route refreshes after the provider context changes. Done means the proxy keeps returning 200 after only the provider is redeployed, or the AI Workspace clearly identifies affected proxies that need redeployment.

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

説明

Area/AIWorkspace Area/Gateway Aspect/AI Severity/Major Type/Bug
Please select the area the issue is related to

Gateway, AI Workspace

Please select the aspect the issue is related to

Aspect/AI (AI/LLM integration, MCP, AI readiness)

Description

When an LLM provider's context changes and the provider is deployed again, every LLM proxy that uses it starts returning 404. platform-api still shows those proxies as DEPLOYED, and they keep failing until each one is deployed again.

When the gateway builds a proxy's route, it copies the provider's context into the proxy's loopback upstream (gateway/gateway-controller/pkg/utils/llm_transformer.go:209). Deploying the provider updates only the provider, so the proxy keeps forwarding to the old context. The router log shows the proxy's request going to the old path:

"POST /b07proxy/chat/completions HTTP/1.1" /b07prov/chat/completions - 404 - direct_response ...

The AI Workspace warning shown when a provider's context is edited ("You have modified the context of this service provider. After updating, you will need to redeploy on the gateway for the changes to take effect.") mentions only the provider, not its proxies.

Expected: proxies keep working after their provider's context changes, or the user is told which proxies need to be deployed again.
Actual: the proxies return 404 while showing DEPLOYED.

Related: #3493.

Steps to Reproduce
  1. Create a provider: POST /api/v0.9/llm-providers with {"id":"b07-prov","displayName":"b07-prov","version":"v1.0","template":"openai","context":"/b07prov","upstream":{"main":{"url":"<echo-backend>/v1"}},"accessControl":{"mode":"allow_all"}}.
  2. Create a proxy on it: POST /api/v0.9/llm-proxies with {"id":"b07-proxy","displayName":"b07-proxy","version":"v1.0","projectId":"default","context":"/b07proxy","provider":{"id":"b07-prov"}}.
  3. Deploy the provider, then the proxy, to the same gateway (POST .../deployments, base: current). Wait for DEPLOYED on both.
  4. Call the proxy: POST <router>/b07proxy/chat/completions with {"model":"gpt-4o","messages":[{"role":"user","content":"hi"}]}. It returns 200.
  5. Change the provider's context: GET /api/v0.9/llm-providers/b07-prov, set "context":"/b07prov-new", and PUT it back. It returns 200.
  6. Deploy only the provider again. Wait for DEPLOYED.
  7. Call the provider at its new context: POST <router>/b07prov-new/chat/completions. It returns 200.
  8. Call the proxy again (same request as step 4). It returns 404 ({"error":"Not Found"}), and still does 20 seconds later. GET /api/v0.9/llm-proxies/b07-proxy/deployments still shows the proxy DEPLOYED.
  9. Deploy the proxy again. The same call now returns 200.
Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)
  • Source: main at f5c93849.
  • platform-api built from source (SQLite).
  • Gateway images (gateway-controller / gateway-runtime 2026.09.24) built from that commit.
  • Echo backend: ghcr.io/wso2/api-platform/sample-service:latest.
  • macOS with Rancher Desktop.
主要言語
Go
スター
85
フォーク
137
平均マージ
1日 12時間
マージ済み PR(30日)
247

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

wso2/api-platform のほかの issue

wso2/api-platform の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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