UNPKG

@copilotkit/runtime

Version:

<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />

1 lines 928 B
{"version":3,"file":"sdk-client-utils.mjs","names":[],"sources":["../../../src/service-adapters/shared/sdk-client-utils.ts"],"sourcesContent":["/**\n * SDK clients (OpenAI, Anthropic, Groq) store constructor options like\n * `defaultHeaders` and `fetch` in a private/protected `_options` field\n * with no public accessor. This extracts them with a narrow type assertion.\n */\nexport function getSdkClientOptions(client: object): {\n defaultHeaders?: Record<string, string>;\n fetch?: typeof globalThis.fetch;\n} {\n const rec = client as Record<string, unknown>;\n const options = rec._options;\n if (options != null && typeof options === \"object\") {\n return options as {\n defaultHeaders?: Record<string, string>;\n fetch?: typeof globalThis.fetch;\n };\n }\n return {};\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,oBAAoB,QAGlC;CAEA,MAAM,UADM,OACQ;AACpB,KAAI,WAAW,QAAQ,OAAO,YAAY,SACxC,QAAO;AAKT,QAAO,EAAE"}