From a5225003a3dcbafe891ca9ee2cec50cc7fe47b92 Mon Sep 17 00:00:00 2001 From: Jason Cook Date: Thu, 23 Apr 2026 11:14:23 -0400 Subject: [PATCH] feat(chatgpt): list ChatGPT (OAuth) in the Add Model provider dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Add Model form reads its provider list from ``/public/providers/fields`` (served from ``public_endpoints/provider_create_fields.json``), not from the frontend ``Providers`` enum directly. Add a ChatGPT entry there with a single required ``api_key`` field pre-filled with ``oauth:`` so the admin's workflow is: 1. Credentials → Add Credential → ChatGPT (OAuth) → sign in → credential named ``my-chatgpt`` 2. Add Model → provider: ChatGPT (OAuth) → model name → api_key field shows ``oauth:`` placeholder + tooltip explaining the convention → admin types ``oauth:my-chatgpt`` → save At request time the ChatGPT responses transformation recognises the ``oauth:`` prefix and routes through ``DBAuthenticator`` for the stored credential. Copilot was already in the JSON so its Add Model flow already works. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../provider_create_fields.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/litellm/proxy/public_endpoints/provider_create_fields.json b/litellm/proxy/public_endpoints/provider_create_fields.json index 860593a6eab..6aca902bdf5 100644 --- a/litellm/proxy/public_endpoints/provider_create_fields.json +++ b/litellm/proxy/public_endpoints/provider_create_fields.json @@ -570,6 +570,24 @@ ], "default_model_placeholder": "gpt-3.5-turbo" }, + { + "provider": "ChatGPT", + "provider_display_name": "ChatGPT (OAuth)", + "litellm_provider": "chatgpt", + "credential_fields": [ + { + "key": "api_key", + "label": "OAuth credential reference", + "placeholder": "oauth:my-chatgpt", + "tooltip": "Reference a stored ChatGPT OAuth credential by name, prefixed with 'oauth:'. Create the credential first via Credentials \u2192 Add Credential \u2192 ChatGPT (OAuth).", + "required": true, + "field_type": "text", + "options": null, + "default_value": "oauth:" + } + ], + "default_model_placeholder": "gpt-5.3-codex" + }, { "provider": "CLARIFAI", "provider_display_name": "Clarifai",