- Injected HTTPUpstream service into LanguageServerService - Implemented real upstream API requests via callUpstreamAPI() - Added SSE streaming response handler for streaming messages - Complete error handling and structured logging - Support for masquerading headers (User-Agent, Authorization) - Request/response body marshaling and streaming - Thread-safe session management with metadata storage Core implementation: - LanguageServerService now depends on HTTPUpstream for all HTTP operations - HTTP requests sent to configured Anthropic API endpoint - SSE event parsing and forwarding to clients via update channels - Proper context and timeout handling for streaming operations Phase 1 Status: 95% complete - Upstream API integration: ✅ DONE - Wire dependency injection: ⏳ TODO - Masquerading layer: ⏳ TODO (Phase 2) Next steps: 1. Add Wire provider for LanguageServerService 2. Register HTTP routes in application startup 3. Implement device fingerprinting and token refresh 4. End-to-end testing with real Anthropic API Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
140 lines
3.1 KiB
JSON
140 lines
3.1 KiB
JSON
{
|
|
"language": "zh",
|
|
"theme": "system",
|
|
"auto_refresh": true,
|
|
"refresh_interval": 15,
|
|
"auto_sync": false,
|
|
"sync_interval": 5,
|
|
"default_export_path": null,
|
|
"proxy": {
|
|
"enabled": false,
|
|
"allow_lan_access": false,
|
|
"auth_mode": "auto",
|
|
"port": 8045,
|
|
"api_key": "sk-9f0e5a8dc10848d9aa8d2d4f97481d0f",
|
|
"admin_password": null,
|
|
"auto_start": false,
|
|
"custom_mapping": {},
|
|
"request_timeout": 120,
|
|
"enable_logging": true,
|
|
"debug_logging": {
|
|
"enabled": false,
|
|
"output_dir": null
|
|
},
|
|
"upstream_proxy": {
|
|
"enabled": false,
|
|
"url": ""
|
|
},
|
|
"zai": {
|
|
"enabled": false,
|
|
"base_url": "https://api.z.ai/api/anthropic",
|
|
"api_key": "",
|
|
"dispatch_mode": "off",
|
|
"model_mapping": {},
|
|
"models": {
|
|
"opus": "glm-4.7",
|
|
"sonnet": "glm-4.7",
|
|
"haiku": "glm-4.5-air"
|
|
},
|
|
"mcp": {
|
|
"enabled": false,
|
|
"web_search_enabled": false,
|
|
"web_reader_enabled": false,
|
|
"vision_enabled": false
|
|
}
|
|
},
|
|
"user_agent_override": null,
|
|
"scheduling": {
|
|
"mode": "Balance",
|
|
"max_wait_seconds": 60
|
|
},
|
|
"experimental": {
|
|
"enable_signature_cache": true,
|
|
"enable_tool_loop_recovery": true,
|
|
"enable_cross_model_checks": true,
|
|
"enable_usage_scaling": false,
|
|
"context_compression_threshold_l1": 0.4,
|
|
"context_compression_threshold_l2": 0.55,
|
|
"context_compression_threshold_l3": 0.7
|
|
},
|
|
"security_monitor": {
|
|
"blacklist": {
|
|
"enabled": false,
|
|
"block_message": "Access denied"
|
|
},
|
|
"whitelist": {
|
|
"enabled": false,
|
|
"whitelist_priority": true
|
|
}
|
|
},
|
|
"preferred_account_id": null,
|
|
"saved_user_agent": "antigravity/1.15.8 darwin/arm64",
|
|
"thinking_budget": {
|
|
"mode": "auto",
|
|
"custom_value": 24576
|
|
},
|
|
"global_system_prompt": {
|
|
"enabled": false,
|
|
"content": ""
|
|
},
|
|
"image_thinking_mode": null,
|
|
"proxy_pool": {
|
|
"enabled": false,
|
|
"proxies": [],
|
|
"health_check_interval": 300,
|
|
"auto_failover": true,
|
|
"strategy": "priority",
|
|
"account_bindings": {}
|
|
}
|
|
},
|
|
"antigravity_executable": null,
|
|
"antigravity_args": null,
|
|
"auto_launch": false,
|
|
"scheduled_warmup": {
|
|
"enabled": false,
|
|
"monitored_models": [
|
|
"gemini-3-flash",
|
|
"claude",
|
|
"gemini-3-pro-high",
|
|
"gemini-3-pro-image"
|
|
]
|
|
},
|
|
"quota_protection": {
|
|
"enabled": true,
|
|
"threshold_percentage": 10,
|
|
"monitored_models": [
|
|
"claude",
|
|
"gemini-3-pro-high",
|
|
"gemini-3-flash",
|
|
"gemini-3-pro-image",
|
|
"gemini-3.1-pro-high",
|
|
"gemini-3.1-pro-low",
|
|
"claude-sonnet-4-6"
|
|
]
|
|
},
|
|
"pinned_quota_models": {
|
|
"models": [
|
|
"gemini-3-pro-high",
|
|
"gemini-3-flash",
|
|
"gemini-3-pro-image",
|
|
"claude-sonnet-4-5-thinking"
|
|
]
|
|
},
|
|
"circuit_breaker": {
|
|
"enabled": true,
|
|
"backoff_steps": [
|
|
60,
|
|
300,
|
|
1800,
|
|
7200
|
|
]
|
|
},
|
|
"hidden_menu_items": [],
|
|
"cloudflared": {
|
|
"enabled": true,
|
|
"mode": "quick",
|
|
"port": 8045,
|
|
"token": "",
|
|
"use_http2": true
|
|
}
|
|
} |