[FEATURE] List models from an OpenAI-compatible endpoint (LiteLLM) in the model form

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

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

@balcsida がすでに取り組んでいます。

2026年11月20日 から。

  • #3752 @balcsida による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes, postgresql
領域
api, backend

調査の方向性

Start from the ModelProviderConfig discovery contract added in #3494 and trace ListConfiguredProviders and WithProviderModelRefresher to their missing callers; the reconciler that should set Ready and the model form are the two ends. Read the linked draft PR #3752 and the closed #3423 before choosing between on-demand discovery and a persisted PostgreSQL inventory. Done means an admin-configured OpenAI-compatible gateway appears as a selectable provider and its models can be listed in the model form without manual IDs.

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

説明

📋 Prerequisites
📝 Feature Summary

List the models an OpenAI-compatible endpoint (e.g. a LiteLLM proxy) serves when creating a model in the UI, instead of typing the ID by hand.

❓ Problem Statement / Motivation

We run kagent against a LiteLLM proxy. The model form only offers the built-in catalogue per provider, so for a gateway every model ID has to be looked up and typed in.

ModelProviderConfig looks like the resource for this, and since #3494 it has the discovery contract (discoveryAuth, OpenAI-compatible only). As far as I can tell nothing uses it yet, in v1.0.1 or on main:

  • no reconciler sets its Ready condition, so ListConfiguredProviders is always empty
  • WithProviderModelRefresher has no caller, so ListProviderModels with refresh: true fails with "provider model refresher is not configured"
  • without refresh it returns NotFound, as there is no stored inventory

#3423 implemented discovery but was closed, and I could not find a follow-up.

💡 Proposed Solution

An admin declares the gateway once as a ModelProviderConfig, and anyone creating a model can pick it and choose from the models it lists right now.

How that is built is open. I have a small version that keeps no inventory at all and asks the endpoint on demand, and I can open it as a draft PR if that helps the discussion. It is not meant to cut across whatever is planned after #3423.

🔄 Alternatives Considered

Typing the model ID manually works today, it is just error-prone with a gateway that serves many models.

Persisting the discovered catalogue in PostgreSQL was suggested in the #3423 review. That would also serve reads without calling the endpoint, at the cost of a migration.

🎯 Affected Service(s)

Multiple services / System-wide

📚 Additional Context

Is discovery still planned along the lines of #3423, and is a smaller first step welcome in the meantime?

Our gateway also has a certificate from a private CA. For the controller that seems solvable today with a mounted bundle and SSL_CERT_FILE, so I left it out of this request.

🙋 Are you willing to contribute?
  • I am willing to submit a PR for this feature
主要言語
Go
スター
4.5k
フォーク
937
平均マージ
1日 10時間
マージ済み PR(30日)
150

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

kagent-dev/kagent のほかの issue

kagent-dev/kagent の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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