Commit Graph

11 Commits

Author SHA1 Message Date
Atai Barkai e499c65dce refactor(deprecation): isolate v1 under deprecated source boundaries 2026-08-21 16:51:17 -07:00
Tyler Slaton 5064884c3f fix(runtime): update Anthropic defaults without restricting model IDs 2026-08-20 16:39:15 -07:00
Rod Boev 005aebbede test(runtime): align Anthropic coalescing fixtures with current message types 2026-07-24 18:59:25 -04:00
Rod Boev b94c1be8c2 fix(runtime): coalesce consecutive same-role Anthropic messages before dispatch (#2910) 2026-07-24 18:45:10 -04:00
Austin Merrick 4ba201b5c4 fix: repair check-types across all packages and gate it in CI
Repairs TypeScript check-types across the monorepo and adds a CI gate so
regressions are caught going forward:

- core: bundler module resolution and strict-mode fixes
- sdk-js: bundler module resolution; keep codegen, formatter, packaging working
- react-core: fixes across components, hooks, and tests
- react-native: restore catch binding referenced by TypeError cause
- runtime: repair check-types and bound AI SDK schema inference
- web-inspector: nodenext import extensions, export Anchor
- remaining packages and node example: assorted check-types repairs
- deps: add missing type-only devDependencies
- license context driven from /info licenseStatus
- ci: run check-types in the static quality workflow

Squashed from 12 commits for a single, easily-revertable change.
2026-06-23 15:26:47 -07:00
Alem Tuzlak 1ec1b864a6 fix: increase Anthropic adapter default max_tokens to 4096 (#3785)
## Summary
- Default `max_tokens` was hardcoded to 1024, causing truncated
responses for most use cases
- Increased default from 1024 to 4096 while still respecting
user-provided `maxTokens`

Fixes #2354

## Test plan
- [x] Added test verifying default max_tokens is 4096 when not specified
- [x] Added test verifying user-provided maxTokens is passed through
- [x] All existing anthropic adapter tests pass
2026-04-16 11:58:34 +02:00
Alem Tuzlak 8b1bc3aa49 fix: ensure tool_result messages have matching tool_use after token trimming (#2450) (#3820)
## Summary

Fixes #2450

Token trimming in the Anthropic adapter could remove assistant messages
containing `tool_use` blocks while keeping the corresponding user
messages with `tool_result` blocks. Anthropic's API rejects orphaned
`tool_result` messages. This adds a post-processing step that removes
orphaned `tool_result` blocks after trimming.

## Test plan

- [ ] Verify token trimming preserves tool_use/tool_result pairing
- [ ] Verify orphaned tool_result blocks are removed
- [ ] Verify messages with mixed content (tool_result + text) retain
non-orphaned content
2026-04-16 11:54:58 +02:00
Jordan Ritter 78c65a8a38 fix: ensure tool_result and tool_use messages stay paired after token trimming (#2450) 2026-04-14 16:23:34 -07:00
Jordan Ritter f403105ad9 fix: only set hasReceivedContent for processed content blocks
Move hasReceivedContent flag inside each content block type handler
so that skipped unknown tool_use blocks do not prevent the fallback
response mechanism from activating. Add tests for unknown tool
skipping behavior.
2026-04-14 15:47:27 -07:00
Jordan Ritter 641da3350e fix: increase Anthropic adapter default max_tokens from 1024 to 4096 (#2354)
The hardcoded 1024 default was too restrictive for most use cases,
causing truncated responses. Increase to 4096 as a more reasonable
default while still respecting user-provided maxTokens.
2026-04-12 13:21:00 -07:00
Tyler Slaton 96885b5959 refactor: consolidate V1/V2 packages into flat @copilotkit/* structure
Flatten all packages from packages/v1/* and packages/v2/* into packages/* —
every package now lives directly under the @copilotkit/ scope with no v1/v2
subdirectories.

- Move all v1 packages (react-core, react-ui, runtime, shared, etc.) from
  packages/v1/* to packages/*
- Absorb v2 react code into packages/react-core/src/v2/ (exported via /v2 subpath)
- Absorb v2 agent code into packages/runtime/src/agent/ (exported via /v2 subpath)
- Move v2 packages (core, angular, demo-agents, etc.) to packages/*
- Replace all @copilotkitnext/* imports with @copilotkit/* equivalents
- Keep @copilotkitnext/angular as the sole exception (angular remains on next)
- Update CI workflows, renovate config, release scripts for flat structure
- No public API surface changes — all exports fields are preserved

Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-28 16:45:10 -07:00