feat: support Doubao coding plan LLM and UI configuration
| | |
| | | "base_url": "https://ark.cn-beijing.volces.com/api/v3", |
| | | "enable_proxy": False, |
| | | }, |
| | | "doubao": { |
| | | "api_key": "", |
| | | "base_url": "https://ark.cn-beijing.volces.com/api/coding/v3", |
| | | "enable_proxy": False, |
| | | }, |
| | | "kling": { |
| | | "base_url": "https://api-beijing.klingai.com", |
| | | "access_key": "", |
| | |
| | | }, |
| | | }, |
| | | "models": { |
| | | "llm": "qwen3.5-plus", |
| | | "vlm": "qwen3.5-plus", |
| | | "llm": "ark-code-latest", |
| | | "vlm": "ark-code-latest", |
| | | "image_it2i": "doubao-seedream-5-0-260128", |
| | | "image_t2i": "doubao-seedream-5-0-260128", |
| | | "video": "wan2.7-i2v", |
| | |
| | | ARK_API_KEY = _get(CONFIG, "api_providers.ark.api_key") |
| | | ARK_BASE_URL = _get(CONFIG, "api_providers.ark.base_url") |
| | | ARK_ENABLE_PROXY = _get(CONFIG, "api_providers.ark.enable_proxy") |
| | | DOUBAO_API_KEY = _get(CONFIG, "api_providers.doubao.api_key") |
| | | DOUBAO_BASE_URL = _get(CONFIG, "api_providers.doubao.base_url") |
| | | DOUBAO_ENABLE_PROXY = _get(CONFIG, "api_providers.doubao.enable_proxy") |
| | | KLING_ACCESS_KEY = _get(CONFIG, "api_providers.kling.access_key") |
| | | KLING_SECRET_KEY = _get(CONFIG, "api_providers.kling.secret_key") |
| | | KLING_BASE_URL = _get(CONFIG, "api_providers.kling.base_url") |
| | |
| | | cls.ARK_API_KEY = _get(clean, "api_providers.ark.api_key") |
| | | cls.ARK_BASE_URL = _get(clean, "api_providers.ark.base_url") |
| | | cls.ARK_ENABLE_PROXY = _get(clean, "api_providers.ark.enable_proxy") |
| | | cls.DOUBAO_API_KEY = _get(clean, "api_providers.doubao.api_key") |
| | | cls.DOUBAO_BASE_URL = _get(clean, "api_providers.doubao.base_url") |
| | | cls.DOUBAO_ENABLE_PROXY = _get(clean, "api_providers.doubao.enable_proxy") |
| | | cls.KLING_ACCESS_KEY = _get(clean, "api_providers.kling.access_key") |
| | | cls.KLING_SECRET_KEY = _get(clean, "api_providers.kling.secret_key") |
| | | cls.KLING_BASE_URL = _get(clean, "api_providers.kling.base_url") |
| | |
| | | api_key: '' |
| | | base_url: https://ark.cn-beijing.volces.com/api/v3 |
| | | enable_proxy: false |
| | | doubao: |
| | | api_key: '' |
| | | base_url: https://ark.cn-beijing.volces.com/api/coding/v3 |
| | | enable_proxy: false |
| | | kling: |
| | | base_url: https://api-beijing.klingai.com |
| | | access_key: '' |
| | | secret_key: '' |
| | | enable_proxy: false |
| | | models: |
| | | llm: qwen3.5-plus |
| | | vlm: qwen3.5-plus |
| | | llm: ark-code-latest |
| | | vlm: ark-code-latest |
| | | image_it2i: doubao-seedream-5-0-260128 |
| | | image_t2i: doubao-seedream-5-0-260128 |
| | | video: wan2.7-i2v |
| | |
| | | model_lower = model.lower() |
| | | if model_lower.startswith("gemini"): |
| | | result = self.gemini_client.query(prompt, image_urls=image_urls, model=model) |
| | | elif "ep-" in model_lower or "doubao" in model_lower or "ark" in model_lower: |
| | | # Doubao models via Volcengine ARK |
| | | if getattr(self, "_doubao_client", None) is None: |
| | | self._doubao_client = GPT( |
| | | base_url=Config.DOUBAO_BASE_URL, |
| | | api_key=Config.DOUBAO_API_KEY, |
| | | ) |
| | | result = self._doubao_client.query(prompt, image_urls=image_urls, model=model, web_search=web_search) |
| | | elif "gpt" in model_lower: |
| | | # OpenAI series models |
| | | result = self.gpt_client.query(prompt, image_urls=image_urls, model=model, web_search=web_search) |
| | |
| | | ], |
| | | }, |
| | | { |
| | | title: 'Doubao (LLM/VLM)', |
| | | description: '字节跳动大语言模型及视觉语言模型配置 (例如 ep-xxx 端点)。', |
| | | fields: [ |
| | | { path: 'api_providers.doubao.api_key', label: 'api_key API 密钥', type: 'password' }, |
| | | { path: 'api_providers.doubao.base_url', label: 'base_url 接口地址' }, |
| | | { path: 'api_providers.doubao.enable_proxy', label: 'enable_proxy 启用代理', type: 'boolean' }, |
| | | ], |
| | | }, |
| | | { |
| | | title: 'ARK', |
| | | description: 'Seedream / Seedance 使用的火山方舟配置。', |
| | | fields: [ |