feat: customize model provider requests

Model connections can now save bounded JSON request headers and top-level body fields. Direct requests and Continue support both; local OpenCode and DeepSeek Harness use only native header support, while the managed remote OpenCode gateway applies both.

Runtime, protocol, and authentication fields keep precedence. Custom values are ordinary connection settings, not credential storage. This migrates Runtime settings from v20 to v21 and updates the DeepSeek control and managed Runtime ACP capabilities.

Release note: 模型连接详情新增自定义请求头和请求体;直连与 Continue 支持两者,本地 OpenCode 和 DeepSeek Harness 仅应用原生支持的请求头,受管远程 OpenCode 支持两者,界面会明确提示生效范围。
This commit is contained in:
mesalogo
2026-09-03 22:34:01 +08:00
parent 3765a937bd
commit 4e60a4ca61
53 changed files with 2009 additions and 365 deletions
@@ -145,6 +145,12 @@ export const attachWelcomeSchema = z
export type AttachPreface = z.infer<typeof attachPrefaceSchema>
export type AttachWelcome = z.infer<typeof attachWelcomeSchema>
export const RUNTIME_ACP_CAPABILITY_NAME = 'runtime/acp'
export const RUNTIME_ACP_CAPABILITY_VERSION = 5
export const RUNTIME_MODEL_BRIDGE_CAPABILITY_NAME =
'runtime/model-bridge'
export const RUNTIME_MODEL_BRIDGE_CAPABILITY_VERSION = 1
export const agentCapabilitySchema = z
.object({
name: z