Commit Graph

4 Commits

Author SHA1 Message Date
王性驊 3dc49bfc7d fix: remove duplicate Verbose field and use raw JSON parsing for handlers
- Remove Verbose from Config struct (inherited from RestConf)
- Remove Verbose from yaml config to fix conflict
- Use raw JSON parsing in handlers for interface{} Content field
- Fix config tests
2026-04-04 12:49:32 +08:00
王性驊 9e2a10b614 feat: complete implementation of all endpoints and config
- Update etc/chat-api.yaml with all configuration options (no env vars)
- Add ToBridgeConfig method to Config for YAML-based config
- Implement complete AnthropicMessages streaming with SSE
- Add Tools field to AnthropicRequest
- Update ServiceContext with model tracking
- Add all CRUD handlers for health, models, chat, anthropic

Features restored:
- Health check endpoint
- Models list with caching
- ChatCompletions streaming (OpenAI format)
- AnthropicMessages streaming (Anthropic format)
- Tool calls support for both formats
- Thinking/reasoning content support
- Rate limit detection and handling
- Account pool integration
- Request/response logging
- Model resolution with strict mode
- Workspace and prompt truncation handling
2026-04-03 23:17:04 +08:00
王性驊 081f404f77 Task 9: Cleanup - remove old internal files, update import paths, add go-zero entry point
- Removed old files from internal/* (migrated to pkg/*)
- Removed old CLI files from cmd/ (now in cmd/cli/)
- Updated import paths (internal/* -> pkg/*)
- Rewrote main.go to support CLI commands + go-zero HTTP server
- Fixed AccountStat type references (use entity.AccountStat)
- Fixed cmd/cli/* to use usecase package instead of agent
- Fixed logger to use entity.AccountStat
- Fixed geminiweb fmt.Println redundant newlines
- Fixed scripts/detect-gemini-dom.go pointer format issues
2026-04-03 22:54:18 +08:00
王性驊 a2f1d05391 first commit 2026-03-30 14:09:15 +00:00