File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ export class CodexAcpClient {
102102 if ( ! gatewaySettings ) throw RequestError . invalidRequest ( ) ;
103103
104104 const baseUrl = gatewaySettings . baseUrl ;
105+ const providerName = typeof gatewaySettings . providerName === "string" && gatewaySettings . providerName . trim ( ) . length > 0
106+ ? gatewaySettings . providerName
107+ : "User-provided gateway" ;
105108 const headers : Record < string , string > = {
106109 "X-Client-Feature-ID" : "codex" ,
107110 ...gatewaySettings . headers
@@ -110,7 +113,7 @@ export class CodexAcpClient {
110113 this . gatewayConfig = {
111114 modelProvider : "custom-gateway" ,
112115 config : {
113- name : "User-provided gateway" ,
116+ name : providerName ,
114117 base_url : baseUrl ,
115118 http_headers : headers ,
116119 wire_api : "responses"
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export interface GatewayAuthRequest extends AuthenticateRequest {
4949 "gateway" : {
5050 baseUrl : string ;
5151 headers : Record < string , string > ;
52+ providerName ?: string ;
5253 }
5354 } ;
5455}
@@ -59,4 +60,4 @@ export type CodexAuthRequest = ApiKeyAuthRequest | ChatGPTAuthRequest | GatewayA
5960
6061export function isCodexAuthRequest ( request : AuthenticateRequest ) : request is CodexAuthRequest {
6162 return request . methodId === "api-key" || request . methodId === "chat-gpt" || request . methodId === "gateway" ;
62- }
63+ }
You can’t perform that action at this time.
0 commit comments