mirror of
https://github.com/tiennm99/claude-central-gateway.git
synced 2026-04-17 13:20:56 +00:00
refactor: Modularize proxy and add tool_use support
- Split monolithic messages.js (223 lines) into 5 focused modules - Add full tool_use/tool_result round-trip translation - Add x-api-key header authentication (Anthropic SDK default) - Fix SSE Content-Type via Hono streamSSE helper - Fix streaming usage tracking with stream_options.include_usage - Add stop_reason mapping (end_turn, max_tokens, tool_use, stop_sequence) - Forward stop_sequences to OpenAI stop parameter - Handle system message as string or array of content blocks - Use timing-safe XOR comparison for auth tokens - Cache OpenAI client and model map across requests - Sanitize error responses to prevent upstream detail leakage - Use crypto.randomUUID() for unique message IDs - Remove non-existent build/dev commands from vercel.json
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
{
|
||||
"buildCommand": "npm run build",
|
||||
"devCommand": "npm run dev",
|
||||
"installCommand": "npm install",
|
||||
"framework": null,
|
||||
"rewrites": [
|
||||
|
||||
Reference in New Issue
Block a user