feat: add sub2api codex upstream profiles
This commit is contained in:
@@ -6,7 +6,7 @@ function assertCondition(condition: unknown, message: string, detail: unknown =
|
||||
|
||||
const baseOptions = {
|
||||
providerName: "OpenAI",
|
||||
baseUrl: "http://127.0.0.1:21880",
|
||||
baseUrl: "https://sub2api.74-48-78-17.nip.io/",
|
||||
wireApi: "responses",
|
||||
supportsWebSockets: true,
|
||||
responsesWebSocketsV2: true,
|
||||
@@ -33,7 +33,7 @@ const existing = [
|
||||
const updated = renderCodexLocalConsumerToml(existing, baseOptions);
|
||||
|
||||
assertCondition(updated.includes('model_provider = "OpenAI"'), "model_provider must point at the configured provider", updated);
|
||||
assertCondition(updated.includes('base_url = "http://127.0.0.1:21880"'), "provider base_url must use the Sub2API consumer endpoint", updated);
|
||||
assertCondition(updated.includes('base_url = "https://sub2api.74-48-78-17.nip.io/"'), "provider base_url must use the fixed public Sub2API consumer endpoint", updated);
|
||||
assertCondition(updated.includes("requires_openai_auth = true"), "provider must require OpenAI auth", updated);
|
||||
assertCondition(updated.includes("supports_websockets = true"), "provider must enable WebSocket transport", updated);
|
||||
assertCondition(updated.includes("responses_websockets_v2 = true"), "features must enable Responses WebSocket v2", updated);
|
||||
|
||||
Reference in New Issue
Block a user