MCPcopy Index your code
hub / github.com/microsoft/TypeChat / isResponsesApiUrl

Function isResponsesApiUrl

typescript/src/model.ts:319–326  ·  view source on GitHub ↗

* Returns true when the given URL targets the OpenAI Responses API. * Detection is based on whether the URL path ends with `/responses` (before any query string). * This covers both the standard OpenAI endpoint (`https://api.openai.com/v1/responses`) and * Azure OpenAI deployments that end with `

(url: string)

Source from the content-addressed store, hash-verified

317 * Azure OpenAI deployments that end with `/responses?api-version=...`.
318 */
319function isResponsesApiUrl(url: string): boolean {
320 try {
321 return new URL(url).pathname.endsWith("/responses");
322 } catch {
323 // Fallback for relative or non-standard URLs
324 return url.split("?")[0].endsWith("/responses");
325 }
326}
327
328/**
329 * Sleeps for the given number of milliseconds.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected