Commit Graph

47 Commits

Author SHA1 Message Date
github-actions[bot] ea746d4629 chore(post-release): update version to 1.54.0 2026-03-12 22:32:04 +00:00
github-actions[bot] 98890426e5 chore(post-release): update version to 1.54.0-next.9 2026-03-12 19:08:50 +00:00
github-actions[bot] b443706792 chore(post-release): update version to 1.54.0-next.8 2026-03-12 16:52:13 +00:00
github-actions[bot] ecd76256ed chore(post-release): update version to 1.54.0-next.7 2026-03-12 14:26:14 +00:00
github-actions[bot] ed34d9daef chore(post-release): update version to 1.54.0-next.6 2026-03-11 16:22:53 +00:00
github-actions[bot] e9cb7dfe26 chore(post-release): update version to 1.54.0-next.5 2026-03-11 15:20:13 +00:00
github-actions[bot] 190eb07f09 chore(post-release): update version to 1.54.0-next.4 2026-03-11 12:50:08 +00:00
github-actions[bot] 60de47cda2 chore(post-release): update version to 1.54.0-next.3 2026-03-11 11:14:53 +00:00
github-actions[bot] d2cf028903 chore(post-release): update version to 1.53.1-next.2 2026-03-07 08:47:03 +00:00
github-actions[bot] 6c4aab7d6f chore(post-release): update version to 1.53.1-next.1 2026-03-06 18:32:39 +00:00
github-actions[bot] 1fd878c582 chore(post-release): update version to 1.53.1-next.0 2026-03-06 17:10:16 +00:00
github-actions[bot] 57eb016a10 chore(post-release): update version to 1.53.0 2026-03-05 23:57:25 +00:00
github-actions[bot] 671fd0ae47 chore(post-release): update version to 1.53.0-next.6 2026-03-05 23:41:37 +00:00
github-actions[bot] 3ba2352ef8 chore(post-release): update version to 1.53.0-next.5 2026-03-05 23:06:01 +00:00
github-actions[bot] 9f12589107 chore(post-release): update version to 1.52.2-next.4 2026-03-05 21:28:52 +00:00
github-actions[bot] 2173e89096 chore(post-release): update version to 1.52.2-next.3 2026-03-05 17:42:38 +00:00
Ran Shem Tov e76e5e7c11 chore: use latest agui 2026-03-05 16:43:33 +01:00
github-actions[bot] 3ff24c8b05 chore(post-release): update version to 1.52.2-next.2 2026-03-05 10:31:34 +00:00
Maxim 9241c2b611 feat(runtime): upgrade AI SDK to v6 to match v2 agent 2026-03-04 15:02:37 -05:00
Tyler Slaton aebb9b5918 fix(runtime): remove openai as a peerdep
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-04 13:14:01 -05:00
github-actions[bot] 7abe7f89d1 chore(post-release): update version to 1.52.2-next.1 2026-03-03 23:59:38 +00:00
github-actions[bot] 4b78d74e11 chore(post-release): update version to 1.52.2-next.0 2026-03-03 17:40:27 +00:00
Alem Tuzlak 93edc65f23 fix: update build process and add outputs for snapshot caching 2026-03-02 11:42:22 -05:00
github-actions[bot] aeac645881 chore(post-release): update version to 1.52.1 2026-02-27 20:04:51 +00:00
Markus Ecker 39722ecbe4 Merge branch 'main' into mme/ag-ui-0.0.46 2026-02-27 15:13:22 +01:00
github-actions[bot] d523d6cc68 chore(post-release): update version to 1.52.1-next.1 2026-02-27 14:12:29 +00:00
Markus Ecker 979511a900 chore: upgrade AG-UI to 0.0.46 2026-02-27 14:47:50 +01:00
github-actions[bot] 0cf39911a0 chore(post-release): update version to 1.52.1-next.0 2026-02-27 03:53:52 +00:00
Jordan Ritter 3f1259d060 fix: propagate custom provider config from service adapters to BuiltInAgent (#3283)
Fixes #2903

## The Bug

Azure OpenAI users get `AI_LoadAPIKeyError: OpenAI API key is missing`
despite passing a properly configured `OpenAI` instance to
`OpenAIAdapter`, exactly as shown in the docs.

**Root cause**: `CopilotRuntime.handleServiceAdapter()` discards the
adapter's configured OpenAI instance and constructs a plain string
`"openai/gpt-4o"` to pass to `BuiltInAgent`. The agent's
`resolveModel()` then creates a *brand new* OpenAI provider using only
`OPENAI_API_KEY`, losing all Azure configuration (baseURL, api-key
header, api-version query param).

The V1 adapter's `process()` method — which correctly uses the custom
OpenAI instance — is dead code. It's never called. Only `.provider` and
`.model` strings are extracted.

```
User configures Azure OpenAI instance →
  OpenAIAdapter stores it →
    CopilotRuntime extracts only "openai"/"gpt-4o" strings →
      BuiltInAgent.resolveModel("openai/gpt-4o") →
        createOpenAI({ apiKey: OPENAI_API_KEY }) →
          💥 API key missing / wrong endpoint
```

## Workaround

Until this is merged, users can bypass the broken adapter entirely by
using `BuiltInAgent` directly with the Vercel AI SDK Azure provider:

```typescript
import { createAzure } from "@ai-sdk/azure";
import { CopilotRuntime, copilotRuntimeNodeHttpEndpoint } from "@copilotkit/runtime";
import { BuiltInAgent } from "@copilotkitnext/agent";

const azure = createAzure({
  resourceName: process.env.AZURE_RESOURCE_NAME,
  apiKey: process.env.AZURE_API_KEY,
});

const runtime = new CopilotRuntime({
  agents: {
    default: new BuiltInAgent({
      model: azure("your-deployment-name"),
    }),
  },
});

// Then use copilotRuntimeNodeHttpEndpoint as usual — no serviceAdapter needed
```

This works because `BuiltInAgent` already accepts `LanguageModel`
instances and `resolveModel()` passes them straight through.

## The Fix

Add an optional `getLanguageModel()` method to `CopilotServiceAdapter`.
Adapters that accept custom SDK instances (OpenAI, Anthropic, Groq) now
implement this to produce a pre-configured Vercel AI SDK `LanguageModel`
that carries the full provider configuration. `CopilotRuntime` prefers
this over the string format when creating `BuiltInAgent`.

**Backward compatible**: `getLanguageModel()` is optional on the
interface, so existing custom adapters continue to work unchanged.

| File | Change |
|------|--------|
| `service-adapter.ts` | Add optional `getLanguageModel()` to
`CopilotServiceAdapter` interface |
| `openai-adapter.ts` | Implement `getLanguageModel()` using
`createOpenAI` with the configured instance's `baseURL`/`apiKey` |
| `anthropic-adapter.ts` | Implement `getLanguageModel()` using
`createAnthropic` |
| `groq-adapter.ts` | Implement `getLanguageModel()` using
`createOpenAI` (Groq is OpenAI-compatible) |
| `copilot-runtime.ts` | Prefer `serviceAdapter.getLanguageModel()` over
string model when creating `BuiltInAgent` |
| `package.json` | Add `ai`, `@ai-sdk/openai`, `@ai-sdk/anthropic`
dependencies |

## Test plan

- [x] V2 agent tests pass (101/101)
- [x] V1 runtime build succeeds with no type errors
- [x] V1 runtime tests: same pass/fail as `main` (pre-existing failures
unrelated to this change)
- [ ] Manual: configure Azure OpenAI via `OpenAIAdapter` without
`OPENAI_API_KEY` — should work without `AI_LoadAPIKeyError`
- [ ] Manual: standard OpenAI via `OpenAIAdapter` with `OPENAI_API_KEY`
— should continue working

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-02-26 18:36:11 -04:00
github-actions[bot] f924ecb4aa chore(post-release): update version to 1.52.0 2026-02-26 19:37:25 +00: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
github-actions[bot] a0cd2ed364 chore(post-release): update version to 1.52.0-next.8 2026-02-24 15:21:43 +00:00
Alem Tuzlak 942d397352 feat: e2e selectors for components (#3264) 2026-02-24 16:18:11 +01:00
github-actions[bot] 17d42682ef chore(post-release): update version to 1.52.0-next.7 2026-02-24 14:54:00 +00:00
github-actions[bot] 740d21a0aa chore(post-release): update version to 1.52.0-next.6 2026-02-21 02:42:07 +00:00
github-actions[bot] 4fc8abe886 chore(post-release): update version to 1.52.0-next.5 2026-02-21 02:20:08 +00:00
github-actions[bot] fac1c7c015 chore(post-release): update version to 1.51.5-next.4 2026-02-20 23:28:02 +00:00
github-actions[bot] 2e3a03132b chore(post-release): update version to 1.51.5-next.3 2026-02-20 05:42:01 +00:00
github-actions[bot] 365b915e26 chore(post-release): update version to 1.51.5-next.2 2026-02-18 23:50:35 +00:00
github-actions[bot] 012c8aa111 chore(post-release): update version to 1.51.5-next.1 2026-02-18 23:11:01 +00:00
Alem Tuzlak 98ed92c4ef Feat/speed up build system (#3213) 2026-02-17 18:34:26 +01:00
github-actions[bot] 521c05dd57 chore(post-release): update version to 1.51.5-next.0 2026-02-17 10:19:30 +00: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
github-actions[bot] 7e9e80709d chore(post-release): update version to 1.51.4 2026-02-17 01:07:04 +00:00
github-actions[bot] a48236bc37 chore(post-release): update version to 1.51.4-next.8 2026-02-13 19:52:30 +00:00
Alem Tuzlak 7cd968d6a6 refactor: migrate from Turborepo to Nx for task management (#3207) 2026-02-13 16:53:35 +01:00
Alem Tuzlak 7b838547a9 feat: re-architeture the monorepo setup (#3187) 2026-02-13 11:01:44 +01:00