- 添加_is_structured_output_request函数检测是否为结构化JSON输出请求
- 当检测到请求指定responseMimeType为application/json时,跳过gemini-balance主动添加的所有工具
- 仅在非结构化输出场景下,gemini-balance才会自动添加codeExecution、googleSearch、urlContext等工具
- 解决"Tool use with a response mime type: 'application/json' is unsupported"错误
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add AccessLogFormatter class with regex patterns for API key detection
- Create setup_access_logging() function to configure uvicorn access logs
- Support redaction for Google/Gemini (AIza*) and OpenAI (sk-*) API keys
- Configure main.py to use custom access logging with redaction
- Prevent API key exposure in HTTP access logs like "POST /verify-key/AIza..."
Now access logs show: "POST /verify-key/AIzaxx...xyzxyz" instead of full keys
- Add redact_key_for_logging() helper function to show only first/last 6 chars
- Fix API key exposure in app/service/key/key_manager.py line 68
- Apply key redaction across all Python files with API key logging
- Standardize logging security across 17 files including routers, services, handlers
Replaces hardcoded Google API base URLs with `settings.BASE_URL` for improved configurability and maintainability across services.
Removes unused imports and variables from various modules to reduce code bloat and enhance readability.
- Only activate multi-speaker TTS when multiSpeakerVoiceConfig is present
- Preserve original TTS functionality for single-speaker requests
- Support dynamic model selection from user request
- Add fallback mechanism to standard service if multi-speaker TTS fails
- Maintain full backward compatibility with existing TTS systems
- Remove ENABLE_TTS environment variable dependency
- Detect TTS models dynamically by model name
- Use TTS-enhanced service only when needed
- Fallback to standard service if TTS processing fails
- Maintain full backward compatibility
- Implement complete Files API compatible with Gemini API format
- Support resumable file uploads with chunked transfer (tested with 15MB video)
- Create file management service with database tracking
- Add file domain models and API request/response objects
- Implement file routes with proper authentication
- Use fixed API key for Files API requests (due to Google API restrictions)
- Support file state management (PROCESSING, ACTIVE, FAILED)
- Add scheduled task for automatic expired file cleanup
- Integrate seamlessly with existing key management and load balancing