Merge pull request #73 from router-for-me/codex/fix-base-url-handling-for-openai-interface

Fix OpenAI test endpoint to preserve /v1 base path
This commit is contained in:
Supra4E8C
2026-01-29 19:58:55 +08:00
committed by GitHub

View File

@@ -55,9 +55,6 @@ export const buildOpenAIChatCompletionsEndpoint = (baseUrl: string): string => {
if (trimmed.endsWith('/chat/completions')) { if (trimmed.endsWith('/chat/completions')) {
return trimmed; return trimmed;
} }
if (trimmed.endsWith('/v1')) {
return `${trimmed.slice(0, -3)}/chat/completions`;
}
return `${trimmed}/chat/completions`; return `${trimmed}/chat/completions`;
}; };