@coralai/sps-cli 0.67.4 → 0.67.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.67.5
|
|
4
|
+
|
|
5
|
+
- 🔴 **fix(llm)**: reviewer 现在也按 provider 声明的 **transport** 建模型。
|
|
6
|
+
此前只有 chat 那条路读它,reviewer 这条(提示词 / 技能的 AI 生成、翻译)
|
|
7
|
+
**从来没读过** ⇒ 同一个端点"在会话里能用,在 AI 生成里 400"。
|
|
8
|
+
0.67.4 只补了"能存下来",这一条才是"存下来的值有人用"。
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
## 0.67.4
|
|
4
12
|
|
|
5
13
|
- 🔴 **fix(console)**: OpenAI 兼容端点现在能在界面上设 **请求方言(transport)**。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelFactory.d.ts","sourceRoot":"","sources":["../../../src/providers/llm/modelFactory.ts"],"names":[],"mappings":"AAYA,kCAAkC;AAClC,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"modelFactory.d.ts","sourceRoot":"","sources":["../../../src/providers/llm/modelFactory.ts"],"names":[],"mappings":"AAYA,kCAAkC;AAClC,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,kCAe7E"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { OpenAIChatCompletionsModel } from '@openai/agents';
|
|
9
9
|
import OpenAI from 'openai';
|
|
10
|
-
import { buildCodexModel } from './codexModel.js';
|
|
10
|
+
import { buildCodexModel, buildRelayResponsesModel } from './codexModel.js';
|
|
11
11
|
import { getAgentProvider } from './providers.js';
|
|
12
12
|
/** 据 reviewer 配置造一个 SDK Model。 */
|
|
13
13
|
export function createReviewerModel(cfg) {
|
|
@@ -16,6 +16,14 @@ export function createReviewerModel(cfg) {
|
|
|
16
16
|
const p = getAgentProvider(cfg.providerId);
|
|
17
17
|
if (!p)
|
|
18
18
|
throw new Error(`未知 reviewer provider: ${cfg.providerId}(检查 ~/.coral/game-platform/agent-providers.json)`);
|
|
19
|
+
// 🔴 **方言要按 provider 的声明走**,不能一律 chat_completions。
|
|
20
|
+
// 平台网关把 gpt-* 路由到 codex 订阅直连,而 codex 后端只收 Responses ⇒
|
|
21
|
+
// 打 /v1/chat/completions 会被网关 400。
|
|
22
|
+
// 此前只有 chat 那条路读 `transport`,reviewer 这条(提示词/技能的 AI 生成、
|
|
23
|
+
// 翻译)从来没读过 —— 表现是"端点在会话里能用,在 AI 生成里就 400"。
|
|
24
|
+
if (p.transport === 'responses') {
|
|
25
|
+
return buildRelayResponsesModel(p.baseUrl.replace(/\/+$/, ''), p.apiKey, cfg.model);
|
|
26
|
+
}
|
|
19
27
|
const client = new OpenAI({ baseURL: p.baseUrl.replace(/\/+$/, ''), apiKey: p.apiKey });
|
|
20
28
|
return new OpenAIChatCompletionsModel(client, cfg.model);
|
|
21
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelFactory.js","sourceRoot":"","sources":["../../../src/providers/llm/modelFactory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"modelFactory.js","sourceRoot":"","sources":["../../../src/providers/llm/modelFactory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,0BAA0B,EAAE,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