feat: 支持 Completions/Responses 双协议,并在同选型下续链加速

This commit is contained in:
2026-09-24 17:10:34 +08:00
parent 9c2c1ed061
commit d20c6a1302
26 changed files with 533 additions and 43 deletions
@@ -16,6 +16,7 @@ CREATE TABLE IF NOT EXISTS `agent_company_llm_provider` (
`api_key_encrypted` varchar(2000) NOT NULL COMMENT 'API Key 密文',
`api_key_suffix` varchar(16) NOT NULL DEFAULT '' COMMENT 'Key 末几位(展示掩码)',
`display_name` varchar(100) NULL COMMENT '展示名,如 DeepSeek',
`api_style` varchar(32) NOT NULL DEFAULT 'auto' COMMENT 'API协议:auto|completions|responses',
`extra_headers_json` json NULL COMMENT '可选额外请求头',
`create_by` bigint UNSIGNED NULL COMMENT '创建人用户ID',
`update_by` bigint UNSIGNED NULL COMMENT '更新人用户ID',
@@ -0,0 +1,5 @@
-- 提供商增加 API 协议风格:auto | completions | responses
ALTER TABLE `agent_company_llm_provider`
ADD COLUMN `api_style` varchar(32) NOT NULL DEFAULT 'auto'
COMMENT 'API协议:auto=按base_url推断;completions;responses'
AFTER `display_name`;