feat: Antigravity 和 Codex 服务支持

- 新增 Antigravity 服务:签名缓存、URL 可用性检测、信封处理
- 新增 Codex 服务:信封处理、元数据收集器
- 重构 provider transport 支持新的服务架构
- 新增 stream_bridge 和 upstream_stream_bridge 处理流式响应
- 优化 OAuth 工具函数
- 添加相关测试用例
This commit is contained in:
fawney19
2026-02-05 15:57:52 +08:00
parent ed2ff5c1d7
commit 440721368f
44 changed files with 3498 additions and 134 deletions

View File

@@ -48,6 +48,14 @@ class TestThinkingErrorPatterns:
error = '{"error": {"message": "signature verification failed"}}'
assert classifier._is_thinking_error(error) is True
def test_detect_thought_signature_patterns(self, classifier: ErrorClassifier) -> None:
"""检测 Antigravity/Gemini thoughtSignature 相关错误"""
error = '{"error": {"message": "invalid thoughtSignature in thought part"}}'
assert classifier._is_thinking_error(error) is True
error2 = '{"error": {"message": "thought_signature verification failed"}}'
assert classifier._is_thinking_error(error2) is True
# === 结构错误测试 ===
def test_detect_must_start_with_thinking_block(self, classifier: ErrorClassifier) -> None: