Allow --oss / --local-provider to use user-defined [model_providers] entries

オープン 初心者向け
#62,168 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

codex-rs/config/src/config_toml.rsから始めて、validate_oss_provider、ensure_oss_provider_ready、get_default_model_for_oss_providerをたどり、関連するテストと、ユーザー定義の[model_providers.<id>]エントリがどのように読み込まれるかを確認します。--oss --local-provider <id>で設定済みのプロバイダーを受け入れ、利用準備のチェックとデフォルトモデルの動作が説明どおりであることを確認します。issueで提案されたケースがテストで網羅されたら完了です。

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

説明

CLI config custom-model enhancement
What variant of Codex are you using?

CLI

What feature would you like to see?

Let --oss / --local-provider (and oss_provider in config.toml) accept any provider ID that the user has defined under [model_providers.<id>], not only lmstudio and ollama.

Today validate_oss_provider (codex-rs/config/src/config_toml.rs) rejects every other ID with Invalid OSS provider '<id>'. Must be one of: lmstudio, ollama. A user who runs a different local OpenAI-compatible server can already reach it through a custom [model_providers.*] entry plus model_provider = "<id>", but cannot use the --oss flow for it.

Proposed behavior:

  • codex --oss --local-provider <id> accepts <id> when [model_providers.<id>] exists in the user's config.
  • The built-in readiness checks in ensure_oss_provider_ready stay specific to lmstudio and ollama; for user-defined providers, Codex skips setup, as it already does for unknown IDs.
  • get_default_model_for_oss_provider returns None for user-defined providers, so the user's configured model is used.

This would cover requests for individual local runtimes without Codex having to maintain each one, for example #47189 (osaurus).

Additional information

I maintain Rapid-MLX, an open-source OpenAI-compatible inference server for Apple Silicon, so I'm one of the runtimes that would use this. A config that works today without --oss:

model_provider = "rapid-mlx"
model = "qwen3.8-27b-4bit"

[model_providers.rapid-mlx]
name = "Rapid-MLX"
base_url = "http://127.0.0.1:8000/v1"

With this change, codex --oss --local-provider rapid-mlx would work with the same entry.

主要言語
Rust
スター
135k
フォーク
21.4k
平均マージ
1分
マージ済み PR(30日)
998

環境構築

はじめの一歩

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

openai/codex のほかの issue

openai/codex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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