Commit Graph

23 Commits

Author SHA1 Message Date
suyao
1723d72b29
refacto: reasoning cache implementation and update import paths 2025-12-18 20:25:44 +08:00
suyao
9a72a8df2c
refactor: rename directory 2025-12-18 20:17:39 +08:00
suyao
9c1f538f15
test(unified-messages): add unit tests for convertAnthropicToolsToAiSdk and convertAnthropicToAiMessages functions 2025-12-18 17:04:32 +08:00
suyao
5304b585b9
chore: improve comments 2025-12-18 15:50:23 +08:00
suyao
e89af9042c
test(schema): add comprehensive tests for jsonSchemaToZod function 2025-12-18 15:39:21 +08:00
suyao
e507929421
Merge remote-tracking branch 'origin/main' into feat/proxy-api-server 2025-12-07 23:01:38 +08:00
suyao
39d1c71819
fix: type check 2025-12-05 13:59:00 +08:00
suyao
08a537bfe4
fix: test 2025-12-03 12:15:53 +08:00
suyao
fd0be32ab4
fix: openrouter 2025-12-03 11:58:46 +08:00
suyao
fb9a8e7e2c
fix: params map 2025-12-01 02:45:27 +08:00
suyao
4a913fcef7
Refactor: Remove old cache implementation and integrate new reasoning cache service
- Deleted the old ReasoningCache class and its instance.
- Introduced CacheService for managing reasoning caches.
- Updated unified-messages service to utilize new googleReasoningCache and openRouterReasoningCache.
- Added AiSdkToAnthropicSSE adapter to handle streaming events and integrate with new cache service.
- Reorganized shared adapters to include the new AiSdkToAnthropicSSE adapter.
- Created openrouter adapter with detailed reasoning schemas for better type safety and validation.
2025-12-01 00:36:55 +08:00
suyao
3989229f61
feat: enhance API version handling and cache functionality
- Updated reasoning cache to use tool-specific keys for better organization.
- Added methods to list cache keys and entries.
- Improved API version regex patterns for more accurate matching.
- Refactored API host formatting to handle leading/trailing whitespace and slashes.
- Added functions to extract and remove trailing API version segments from URLs.
2025-11-30 07:10:10 +08:00
suyao
e8dccf51fe
feat: enhance reasoning cache integration and update provider options in unified messages 2025-11-28 16:37:58 +08:00
suyao
ed769ac4f7
feat: add CherryAI signed fetch wrapper and enhance tool conversion to Zod schema 2025-11-28 15:48:50 +08:00
suyao
95c18d192a
feat: add reasoning cache support to AiSdkToAnthropicSSE and update unified-messages integration 2025-11-28 13:42:33 +08:00
suyao
9d34098a53
feat: enhance provider configuration and error handling for AI SDK integration 2025-11-28 13:36:29 +08:00
suyao
d367040fd4
feat: implement reasoning cache for improved performance and error handling in AI SDK integration 2025-11-28 13:11:13 +08:00
suyao
356e828422
feat: enhance AI SDK integration with middleware support and improve message handling 2025-11-28 04:12:18 +08:00
suyao
ce25001590
feat: add shared AI SDK middlewares and refactor middleware handling 2025-11-28 01:27:20 +08:00
suyao
f163c4d3ee
fix: resolve PR review issues for Proxy API Server
- Fix tool result content bug: return `values` array instead of empty array
- Fix empty message bug: skip pushing user/assistant messages when content is empty
- Expand provider support: remove type restrictions to support all AI SDK providers
- Add missing alias for @cherrystudio/ai-sdk-provider in main process config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 22:28:44 +08:00
suyao
f225fbe3e3
feat: Implement direct processing for Anthropic SDK and refactor message handling 2025-11-27 20:43:47 +08:00
suyao
192357a32e
feat: Enhance thinking block management and tool conversion in unified messages 2025-11-27 19:19:04 +08:00
suyao
a5e7aa1342
feat: Implement shared provider utilities and API host formatting
- Added provider API host formatting utilities to handle differences between Cherry Studio and AI SDK.
- Introduced functions for formatting provider API hosts, including support for Azure OpenAI and Vertex AI.
- Created a simple API key rotator for managing API key rotation.
- Developed shared provider initialization and mapping utilities for resolving provider IDs.
- Implemented AI SDK configuration utilities for converting Cherry Studio providers to AI SDK configurations.
- Added support for various providers including OpenRouter, Google Vertex AI, and Amazon Bedrock.
- Enhanced error handling and logging in the unified messages service for better debugging.
- Introduced functions for streaming and generating unified messages using AI SDK.
2025-11-27 15:30:19 +08:00