Kevin van Dijk пре 1 месец
родитељ
комит
3818dcb7e5

+ 1 - 0
cli/src/constants/providers/labels.ts

@@ -8,6 +8,7 @@ export const PROVIDER_LABELS: Record<ProviderName, string> = {
 	kilocode: "Kilo Code",
 	anthropic: "Anthropic",
 	"openai-native": "OpenAI",
+	"openai-codex": "OpenAI - ChatGPT Plus/Pro",
 	openrouter: "OpenRouter",
 	bedrock: "Amazon Bedrock",
 	gemini: "Google Gemini",

+ 2 - 0
cli/src/constants/providers/models.ts

@@ -141,6 +141,7 @@ export const PROVIDER_TO_ROUTER_NAME: Record<ProviderName, RouterName | null> =
 	"vscode-lm": null,
 	gemini: null,
 	"openai-native": null,
+	"openai-codex": null,
 	mistral: null,
 	moonshot: null,
 	deepseek: null,
@@ -193,6 +194,7 @@ export const PROVIDER_MODEL_FIELD: Record<ProviderName, string | null> = {
 	"vscode-lm": "vsCodeLmModelSelector",
 	gemini: null,
 	"openai-native": null,
+	"openai-codex": null,
 	mistral: null,
 	moonshot: null,
 	deepseek: null,

+ 4 - 0
cli/src/constants/providers/settings.ts

@@ -810,6 +810,9 @@ export const getProviderSettings = (provider: ProviderName, config: ProviderSett
 				createFieldConfig("openAiNativeBaseUrl", config, "Default"),
 			]
 
+		case "openai-codex":
+			return [createFieldConfig("apiModelId", config, "gpt-4o")]
+
 		case "bedrock":
 			return [
 				createFieldConfig("awsAccessKey", config),
@@ -1055,6 +1058,7 @@ export const PROVIDER_DEFAULT_MODELS: Record<ProviderName, string> = {
 	kilocode: "anthropic/claude-sonnet-4",
 	anthropic: "claude-3-5-sonnet-20241022",
 	"openai-native": "gpt-4o",
+	"openai-codex": "gpt-4o",
 	openrouter: "anthropic/claude-3-5-sonnet",
 	bedrock: "anthropic.claude-3-5-sonnet-20241022-v2:0",
 	gemini: "gemini-1.5-pro-latest",

+ 1 - 0
cli/src/constants/providers/validation.ts

@@ -8,6 +8,7 @@ export const PROVIDER_REQUIRED_FIELDS: Record<ProviderName, string[]> = {
 	kilocode: ["kilocodeToken", "kilocodeModel"],
 	anthropic: ["apiKey", "apiModelId"],
 	"openai-native": ["openAiNativeApiKey", "apiModelId"],
+	"openai-codex": ["apiModelId"],
 	openrouter: ["openRouterApiKey", "openRouterModelId"],
 	ollama: ["ollamaBaseUrl", "ollamaModelId"],
 	lmstudio: ["lmStudioBaseUrl", "lmStudioModelId"],

+ 2 - 0
src/shared/WebviewMessage.ts

@@ -202,6 +202,8 @@ export interface WebviewMessage {
 		| "rooCloudManualUrl"
 		| "claudeCodeSignIn"
 		| "claudeCodeSignOut"
+		| "openAiCodexSignIn"
+		| "openAiCodexSignOut"
 		| "switchOrganization"
 		| "condenseTaskContextRequest"
 		| "requestIndexingStatus"

+ 2 - 2
webview-ui/src/components/settings/__tests__/ApiOptions.provider-filtering.spec.tsx

@@ -129,7 +129,7 @@ describe.skip("ApiOptions Provider Filtering", () => {
 		;(MODELS_BY_PROVIDER as any).emptyProvider = {}
 
 		// Add the empty provider to PROVIDERS
-		PROVIDERS.push({ value: "emptyProvider", label: "Empty Provider" })
+		PROVIDERS.push({ value: "emptyProvider", label: "Empty Provider", proxy: false })
 
 		renderWithProviders()
 
@@ -237,7 +237,7 @@ describe.skip("ApiOptions Provider Filtering", () => {
 		// Add an empty static provider to test
 		;(MODELS_BY_PROVIDER as any).testEmptyProvider = {}
 		// Add the provider to the PROVIDERS list
-		PROVIDERS.push({ value: "testEmptyProvider", label: "Test Empty Provider" })
+		PROVIDERS.push({ value: "testEmptyProvider", label: "Test Empty Provider", proxy: false })
 
 		// Create a mock organization allow list that allows the provider but no models
 		const allowList: OrganizationAllowList = {