fix(agent-service): strip /v1 suffix from OPENAI_BASE_URL in STT service
OPENAI_BASE_URL=https://67.223.119.33:8443/v1 already includes /v1, so the URL was being built as .../v1/v1/audio/transcriptions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
15ee296fcd
commit
73eb4350fb
|
|
@ -17,10 +17,11 @@ export class OpenAISttService {
|
|||
|
||||
constructor(private readonly configService: ConfigService) {
|
||||
this.apiKey = this.configService.get<string>('OPENAI_API_KEY', '');
|
||||
// Strip trailing slash and /v1 suffix — we always append /v1/...
|
||||
this.baseUrl = this.configService.get<string>(
|
||||
'OPENAI_BASE_URL',
|
||||
'https://api.openai.com',
|
||||
).replace(/\/$/, '');
|
||||
).replace(/\/$/, '').replace(/\/v1$/, '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue