From 71f2be4a8eb31851cb6db86a64214e03aec35d4c Mon Sep 17 00:00:00 2001 From: Ilia Brovarnik Date: Fri, 17 Apr 2026 15:48:42 +0200 Subject: [PATCH 1/2] Pass gateway provider name through to Codex config --- src/CodexAcpClient.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CodexAcpClient.ts b/src/CodexAcpClient.ts index 39ed8998..75837984 100644 --- a/src/CodexAcpClient.ts +++ b/src/CodexAcpClient.ts @@ -102,6 +102,9 @@ export class CodexAcpClient { if (!gatewaySettings) throw RequestError.invalidRequest(); const baseUrl = gatewaySettings.baseUrl; + const providerName = typeof gatewaySettings.providerName === "string" && gatewaySettings.providerName.trim().length > 0 + ? gatewaySettings.providerName + : "User-provided gateway"; const headers: Record = { "X-Client-Feature-ID": "codex", ...gatewaySettings.headers @@ -110,7 +113,7 @@ export class CodexAcpClient { this.gatewayConfig = { modelProvider: "custom-gateway", config: { - name: "User-provided gateway", + name: providerName, base_url: baseUrl, http_headers: headers, wire_api: "responses" From 7f3e89b29f7ba7c51abef69398d19ce4634a2a06 Mon Sep 17 00:00:00 2001 From: Ilia Brovarnik Date: Mon, 20 Apr 2026 17:17:43 +0200 Subject: [PATCH 2/2] Allow providerName in gateway auth request metadata --- src/CodexAuthMethod.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CodexAuthMethod.ts b/src/CodexAuthMethod.ts index 4e5fe2c0..e80f7ff7 100644 --- a/src/CodexAuthMethod.ts +++ b/src/CodexAuthMethod.ts @@ -49,6 +49,7 @@ export interface GatewayAuthRequest extends AuthenticateRequest { "gateway": { baseUrl: string; headers: Record; + providerName?: string; } }; } @@ -59,4 +60,4 @@ export type CodexAuthRequest = ApiKeyAuthRequest | ChatGPTAuthRequest | GatewayA export function isCodexAuthRequest(request: AuthenticateRequest): request is CodexAuthRequest { return request.methodId === "api-key" || request.methodId === "chat-gpt" || request.methodId === "gateway"; -} \ No newline at end of file +}