# 思考链服务配置 thinking_services: # 主要思考服务 - DeepSeek - id: 1 name: "deepseek-thinking" base_url: "https://api-inference.modelscope.cn" api_path: "/v1/chat/completions" api_key: "sk-xxxxxxxxxxxxxxxx" timeout: 10 # 秒 retry: 3 weight: 100 # 权重越高优先级越高 # 备用思考服务 - OpenAI - id: 2 name: "openai-thinking" base_url: "https://api.openai.com" api_path: "/v1/chat/completions" api_key: "sk-xxxxxxxxxxxxxxxx" timeout: 15 retry: 2 weight: 50 # API通道配置 channels: # DeepSeek 通道 "1": name: "deepseek-channel" base_url: "https://api-inference.modelscope.cn" api_path: "/v1/chat/completions" timeout: 30 # OpenAI 通道 "2": name: "openai-channel" base_url: "https://api.openai.com" api_path: "/v1/chat/completions" timeout: 30 # Anthropic 通道 "3": name: "anthropic-channel" base_url: "https://api.anthropic.com" api_path: "/v1/messages" timeout: 30 # Moonshot 通道 "4": name: "moonshot-channel" base_url: "https://api.moonshot.cn" api_path: "/v1/chat/completions" timeout: 30 # 全局配置 global: # 重试配置 max_retries: 3 default_timeout: 30 # 需要重试的错误码 error_codes: retry_on: - 429 # Rate limit - 500 # Internal server error - 502 # Bad gateway - 503 # Service unavailable - 504 # Gateway timeout # 日志配置 log: level: "info" # debug, info, warn, error format: "json" # text, json output: "file" # console, file file_path: "./logs/deepai.log" # 服务配置 server: port: 8888 host: "0.0.0.0" read_timeout: 30 write_timeout: 30 idle_timeout: 60