Skip to content

Commit 71f2be4

Browse files
committed
Pass gateway provider name through to Codex config
1 parent 9dcedec commit 71f2be4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/CodexAcpClient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)