Commit Graph

8 Commits

Author SHA1 Message Date
Jordan Ritter b8bf8085e0 refactor: replace as-any _options access with typed shared utility
SDK clients store defaultHeaders and fetch in a private _options field.
Extract the access pattern into getSdkClientOptions() with runtime
validation and a narrow return type, eliminating as-any from all three
adapter getLanguageModel() implementations.
2026-02-26 12:43:13 -08:00
Jordan Ritter 311d758570 fix: forward custom fetch from SDK clients to AI SDK providers 2026-02-26 12:03:32 -08:00
Jordan Ritter 7d2c69fef2 fix: forward custom headers, organization, and project to AI SDK providers
Pass defaultHeaders from SDK client instances through to the AI SDK
providers. This is critical for Azure OpenAI (api-key header) and any
custom proxy setups. Also forward organization and project for OpenAI.
2026-02-26 11:52:39 -08:00
Jordan Ritter 3f8b5e2360 fix: propagate custom provider config from service adapters to BuiltInAgent
Service adapters (OpenAIAdapter, AnthropicAdapter, GroqAdapter) accept
custom SDK instances with provider-specific configuration (e.g. Azure
OpenAI with custom baseURL/apiKey/headers), but CopilotRuntime discards
those instances and reconstructs a plain "provider/model" string for
BuiltInAgent. The agent's resolveModel() then creates a fresh provider
using only environment variables, losing all custom configuration.

Add getLanguageModel() to CopilotServiceAdapter so adapters can produce
a pre-configured Vercel AI SDK LanguageModel. CopilotRuntime now prefers
this over the string format when creating BuiltInAgent.

Fixes CopilotKit/CopilotKit#2903
2026-02-26 11:13:08 -08:00
Tyler Slaton ea44dd1d1f fix(runtime): remove dead GraphQL schema building from runtime init (#3236)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:18:59 -05:00
Alem Tuzlak 98ed92c4ef Feat/speed up build system (#3213) 2026-02-17 18:34:26 +01:00
Alem Tuzlak ef0f539867 feat: Added reasoning for improved information display (#3165)
Co-authored-by: Tyler Slaton <54378333+tylerslaton@users.noreply.github.com>
2026-02-17 11:11:47 +01:00
Alem Tuzlak 7b838547a9 feat: re-architeture the monorepo setup (#3187) 2026-02-13 11:01:44 +01:00