9 Commits

Author SHA1 Message Date
a4656707cc Add package-lock.json for reproducible installs 2026-04-05 11:59:58 +07:00
38fe0b9d73 Add .gitignore for node_modules, env files, and build artifacts 2026-04-05 11:58:41 +07:00
170cdb1324 docs: Add comprehensive documentation suite
- Project overview, system architecture, code standards
- API reference with 15+ examples
- Quick start guide with troubleshooting
- Updated README with feature highlights and compatibility matrix
2026-04-05 11:47:18 +07:00
a1113e02aa 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
2026-04-05 11:47:06 +07:00
415790a9f1 refactor: Migrate to Hono framework for multi-platform support
- Replace Vercel-specific handler with Hono framework
- Add Cloudflare Workers support via wrangler.toml
- Restructure project: src/index.js, src/routes/messages.js
- Update README with Cloudflare deployment instructions
- Save framework decision to memory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 23:02:08 +07:00
bfb936ae4a feat: Implement OpenAI proxy with streaming support
- Add main proxy endpoint (api/v1/messages.js)
- Add token validation via GATEWAY_TOKEN
- Add model mapping via MODEL_MAP env var
- Support full SSE streaming in Anthropic format
- Add package.json with openai dependency
- Add vercel.json for routing config
- Update README with Quick Start guide
- Consolidate memory to .claude/memory/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 22:47:38 +07:00
762310880c chore: Add Claude Code memory system files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 22:35:20 +07:00
8a2e8e7089 docs: Add comprehensive README with project overview and alternatives
- Add project description and philosophy
- Document why not use local proxy, LiteLLM, or advanced features
- Add "Not Suitable For" section with alternatives
- Add link to cheap LLM providers repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 22:20:26 +07:00
Tien Nguyen Minh
3008cbd85e Initial commit 2026-03-25 17:56:29 +07:00