feat: expand DeepSeek Harness compatibility
This commit is contained in:
@@ -503,7 +503,7 @@ describe('ChannelSettingsSection', () => {
|
||||
).toBeInTheDocument()
|
||||
expect(
|
||||
within(backend).getByRole('option', {
|
||||
name: 'DeepSeek Harness(预览 · 仅 DeepSeek)'
|
||||
name: 'DeepSeek Harness(预览 · OpenAI 兼容)'
|
||||
})
|
||||
).toBeInTheDocument()
|
||||
|
||||
|
||||
@@ -1372,7 +1372,7 @@ describe('SettingsPanel runtime files', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('configures DeepSeek Harness with a compatible GoodBuddy connection', async () => {
|
||||
it('configures DeepSeek Harness with an OpenAI-compatible gateway', async () => {
|
||||
const harnessProfileId =
|
||||
'00000000-0000-4000-8000-000000000051'
|
||||
getRuntime.mockResolvedValueOnce({
|
||||
@@ -1382,9 +1382,9 @@ describe('SettingsPanel runtime files', () => {
|
||||
{
|
||||
...runtimeSettings.modelProfiles[0]!,
|
||||
id: harnessProfileId,
|
||||
name: 'DeepSeek Chat',
|
||||
baseUrl: 'https://api.deepseek.com/v1',
|
||||
modelName: 'deepseek-chat',
|
||||
name: 'Compatible Gateway',
|
||||
baseUrl: 'https://gateway.example/openai/v1',
|
||||
modelName: 'qwen-plus',
|
||||
protocol: 'openai-chat-completions'
|
||||
}
|
||||
],
|
||||
@@ -1409,10 +1409,10 @@ describe('SettingsPanel runtime files', () => {
|
||||
})
|
||||
)
|
||||
expect(
|
||||
screen.getByText('开发者预览 · 仅支持 DeepSeek')
|
||||
screen.getByText('开发者预览 · OpenAI 兼容')
|
||||
).toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByText(/当前仅支持 DeepSeek 模型/)
|
||||
screen.getByText(/公网地址必须使用 HTTPS/)
|
||||
).toBeInTheDocument()
|
||||
const harnessOverview = screen
|
||||
.getByText('GoodBuddy 内置 DeepSeek Harness')
|
||||
@@ -1451,17 +1451,19 @@ describe('SettingsPanel runtime files', () => {
|
||||
})
|
||||
).not.toBeInTheDocument()
|
||||
const source = screen.getByLabelText(
|
||||
'DeepSeek Harness DeepSeek 模型连接'
|
||||
'DeepSeek Harness OpenAI 兼容模型连接'
|
||||
)
|
||||
expect(screen.queryByRole('radio')).not.toBeInTheDocument()
|
||||
expect(
|
||||
screen.queryByText('使用平台 DeepSeek 环境配置')
|
||||
screen.queryByText('使用管理员预置模型连接')
|
||||
).not.toBeInTheDocument()
|
||||
expect(
|
||||
within(source).getByRole('option', { name: '默认模型(不兼容)' })
|
||||
).toBeDisabled()
|
||||
expect(
|
||||
within(source).getByRole('option', { name: 'DeepSeek Chat' })
|
||||
within(source).getByRole('option', {
|
||||
name: 'Compatible Gateway'
|
||||
})
|
||||
).not.toBeDisabled()
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '保存设置' }))
|
||||
@@ -1480,14 +1482,14 @@ describe('SettingsPanel runtime files', () => {
|
||||
it('keeps an environment-managed source compatible without exposing it as an option', async () => {
|
||||
getRuntime.mockResolvedValueOnce({
|
||||
...runtimeSettings,
|
||||
modelBaseUrl: 'https://api.deepseek.com',
|
||||
modelName: 'deepseek-chat',
|
||||
modelBaseUrl: 'https://gateway.example/openai/v1',
|
||||
modelName: 'qwen-plus',
|
||||
modelProtocol: 'openai-chat-completions',
|
||||
modelProfiles: [
|
||||
{
|
||||
...runtimeSettings.modelProfiles[0]!,
|
||||
baseUrl: 'https://api.deepseek.com',
|
||||
modelName: 'deepseek-chat',
|
||||
baseUrl: 'https://gateway.example/openai/v1',
|
||||
modelName: 'qwen-plus',
|
||||
protocol: 'openai-chat-completions',
|
||||
credentialSource: 'environment'
|
||||
}
|
||||
@@ -1531,10 +1533,10 @@ describe('SettingsPanel runtime files', () => {
|
||||
)
|
||||
expect(screen.queryByRole('radio')).not.toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByText('管理员预置的 DeepSeek 连接')
|
||||
screen.getByText('管理员预置的 OpenAI 兼容连接')
|
||||
).toBeInTheDocument()
|
||||
const source = screen.getByLabelText(
|
||||
'DeepSeek Harness DeepSeek 模型连接'
|
||||
'DeepSeek Harness OpenAI 兼容模型连接'
|
||||
)
|
||||
expect(source).toHaveValue('')
|
||||
fireEvent.change(source, {
|
||||
|
||||
@@ -1973,7 +1973,7 @@ export function SettingsPanel({
|
||||
</div>
|
||||
</div>
|
||||
<p className="settings-notice">
|
||||
{t('runtime.deepseekHarness.deepseekOnlyNotice')}
|
||||
{t('runtime.deepseekHarness.compatibilityNotice')}
|
||||
</p>
|
||||
<RuntimeOverviewCard
|
||||
detection={detection?.deepseekHarness}
|
||||
|
||||
@@ -118,7 +118,7 @@ export const app = {
|
||||
picker: 'Runtime and model',
|
||||
directModels: 'Direct models',
|
||||
deepseekHarnessGroup:
|
||||
'DeepSeek Harness (Developer preview · DeepSeek only)',
|
||||
'DeepSeek Harness (Developer preview · OpenAI-compatible)',
|
||||
manage: 'Manage Runtime and model connections',
|
||||
errors: {
|
||||
readStatus: 'Failed to read Agent Runtime status',
|
||||
|
||||
@@ -32,7 +32,7 @@ export const integrations = {
|
||||
missingProfile: 'The previous direct model no longer exists',
|
||||
noTextModels: 'No text models are available',
|
||||
deepseekHarnessOption:
|
||||
'DeepSeek Harness (Preview · DeepSeek only)',
|
||||
'DeepSeek Harness (Preview · OpenAI-compatible)',
|
||||
missingSelection:
|
||||
'The selected direct model no longer exists. Choose another model.',
|
||||
imageOnlySelection:
|
||||
|
||||
@@ -237,16 +237,18 @@ export const settings = {
|
||||
deepseekHarness: {
|
||||
selectorLabel: 'DeepSeek Harness (Preview)',
|
||||
title: 'DeepSeek Harness',
|
||||
previewDescription: 'Developer preview · DeepSeek only',
|
||||
deepseekOnlyNotice:
|
||||
'DeepSeek Harness currently supports DeepSeek models only and is not intended for other model providers.',
|
||||
previewDescription: 'Developer preview · OpenAI-compatible',
|
||||
compatibilityNotice:
|
||||
'Supports OpenAI-compatible Chat Completions connections with an API key. Public endpoints must use HTTPS; loopback endpoints may use HTTP.',
|
||||
description:
|
||||
'GoodBuddy maintains the fixed Host and control protocol internally and uses pinned Harness libraries underneath. Execute tool calls receive automatic one-time authorization, Ask remains read-only, and cancellation and workspace safety boundaries remain in place. It does not integrate with the DSH plugin or marketplace mechanisms.',
|
||||
managedSource: 'Administrator-provided DeepSeek connection',
|
||||
connection: 'DeepSeek model connection',
|
||||
connectionPlaceholder: 'Select a DeepSeek model connection',
|
||||
managedSource:
|
||||
'Administrator-provided OpenAI-compatible connection',
|
||||
connection: 'OpenAI-compatible model connection',
|
||||
connectionPlaceholder:
|
||||
'Select an OpenAI-compatible model connection',
|
||||
connectionDescription:
|
||||
'Choose a GoodBuddy model connection. Only OpenAI-compatible Chat Completions connections that point to DeepSeek are supported.',
|
||||
'Choose a GoodBuddy model connection. It must use OpenAI Chat Completions with API-key authentication.',
|
||||
advancedDescription:
|
||||
'This Runtime always uses GoodBuddy’s bundled, version-pinned Host. It does not load external DSH plugins, marketplace packages, user profiles, or custom Hosts.'
|
||||
}
|
||||
@@ -504,7 +506,7 @@ export const settings = {
|
||||
incompatibleImageProtocol:
|
||||
'Incompatible (image generation protocol is unsupported)',
|
||||
incompatibleHarnessProtocol:
|
||||
'Incompatible (Chat Completions only)',
|
||||
'Incompatible (requires Chat Completions, an API key, and a secure endpoint)',
|
||||
secureStorageWarning:
|
||||
'Secure system key storage is unavailable. Use an environment variable to avoid storing an API Key in plaintext.'
|
||||
},
|
||||
|
||||
@@ -113,7 +113,8 @@ export const app = {
|
||||
switching: '切换中…',
|
||||
picker: 'Runtime 和模型',
|
||||
directModels: '直连模型',
|
||||
deepseekHarnessGroup: 'DeepSeek Harness(开发者预览 · 仅 DeepSeek)',
|
||||
deepseekHarnessGroup:
|
||||
'DeepSeek Harness(开发者预览 · OpenAI 兼容)',
|
||||
manage: '管理 Runtime 和模型连接',
|
||||
errors: {
|
||||
readStatus: 'Agent Runtime 状态读取失败',
|
||||
|
||||
@@ -26,7 +26,8 @@ export const integrations = {
|
||||
unavailableProfile: '{{name}} · {{modelName}}(不可用)',
|
||||
missingProfile: '原直连模型已不存在',
|
||||
noTextModels: '暂无可用文本模型',
|
||||
deepseekHarnessOption: 'DeepSeek Harness(预览 · 仅 DeepSeek)',
|
||||
deepseekHarnessOption:
|
||||
'DeepSeek Harness(预览 · OpenAI 兼容)',
|
||||
missingSelection: '所选直连模型已不存在,请重新选择。',
|
||||
imageOnlySelection:
|
||||
'所选连接仅支持图片生成,请选择文本模型或 Agent Runtime。',
|
||||
|
||||
@@ -215,16 +215,16 @@ export const settings = {
|
||||
deepseekHarness: {
|
||||
selectorLabel: 'DeepSeek Harness(预览)',
|
||||
title: 'DeepSeek Harness',
|
||||
previewDescription: '开发者预览 · 仅支持 DeepSeek',
|
||||
deepseekOnlyNotice:
|
||||
'DeepSeek Harness 当前仅支持 DeepSeek 模型,不适用于其他模型提供商。',
|
||||
previewDescription: '开发者预览 · OpenAI 兼容',
|
||||
compatibilityNotice:
|
||||
'支持使用 API Key 的 OpenAI 兼容 Chat Completions 连接;公网地址必须使用 HTTPS,本机回环地址可使用 HTTP。',
|
||||
description:
|
||||
'由 GoodBuddy 内部维护固定 Host 与控制协议,复用锁定的 Harness 底层库;Execute 工具调用自动单次授权,Ask 保持只读,并保留取消和工作区安全边界;不接入 DSH 插件或市场机制。',
|
||||
managedSource: '管理员预置的 DeepSeek 连接',
|
||||
connection: 'DeepSeek 模型连接',
|
||||
connectionPlaceholder: '选择 DeepSeek 模型连接',
|
||||
managedSource: '管理员预置的 OpenAI 兼容连接',
|
||||
connection: 'OpenAI 兼容模型连接',
|
||||
connectionPlaceholder: '选择 OpenAI 兼容模型连接',
|
||||
connectionDescription:
|
||||
'从 GoodBuddy 模型连接中选择;仅支持指向 DeepSeek 的 OpenAI 兼容 Chat Completions 连接。',
|
||||
'从 GoodBuddy 模型连接中选择;协议必须为 OpenAI Chat Completions,并使用 API Key。',
|
||||
advancedDescription:
|
||||
'该 Runtime 始终使用 GoodBuddy 内置并固定版本的 Host,不加载外部 DSH 插件、市场包、用户 profile 或自定义 Host。'
|
||||
}
|
||||
@@ -462,7 +462,7 @@ export const settings = {
|
||||
incompatible: '不兼容',
|
||||
incompatibleImageProtocol: '不兼容(不支持图像生成协议)',
|
||||
incompatibleHarnessProtocol:
|
||||
'不兼容(仅支持 Chat Completions)',
|
||||
'不兼容(需 Chat Completions、API Key 和安全地址)',
|
||||
secureStorageWarning:
|
||||
'当前系统密钥服务不可用。为了避免明文落盘,请使用环境变量提供 API Key。'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user