(endpoint: string)
| 57 | * @returns true if the endpoint is already a responses API URL |
| 58 | */ |
| 59 | export function isResponsesEndpoint(endpoint: string): boolean { |
| 60 | const normalizedEndpoint = endpoint.toLowerCase() |
| 61 | return ( |
| 62 | normalizedEndpoint.includes('/responses') && !normalizedEndpoint.includes('/chat/completions') |
| 63 | ) |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Extracts the base URL from a full Azure OpenAI chat completions URL. |