Make English the repository working language (#5)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,8 +78,8 @@ async function runModel(args: string[]): Promise<{ out: string; err: string; cod
|
||||
}
|
||||
}
|
||||
|
||||
describe("penguin config model add/list(--root 与 provider / model_id 分列存储)", () => {
|
||||
it("--root 优先于 PENGUIN_HOME:落盘到指定根目录的隐藏 .project_config.toml(0600)", async () => {
|
||||
describe("penguin config model add/list (--root plus provider / model_id stored as separate fields)", () => {
|
||||
it("--root beats PENGUIN_HOME: written to the hidden .project_config.toml under the given root (0600)", async () => {
|
||||
const add = await runModel([
|
||||
"add",
|
||||
"--model-id",
|
||||
@@ -119,7 +119,7 @@ describe("penguin config model add/list(--root 与 provider / model_id 分列
|
||||
expect(list.out).not.toContain("sk-root-secret-1");
|
||||
});
|
||||
|
||||
it("内置目录推断分组:上游 id 命中目录时条目落该 provider;--set-default 写成对引用", async () => {
|
||||
it("built-in catalog infers the grouping: an upstream id matching the catalog lands under that provider; --set-default writes a pair reference", async () => {
|
||||
const add = await runModel([
|
||||
"add",
|
||||
"--model-id",
|
||||
@@ -144,7 +144,7 @@ describe("penguin config model add/list(--root 与 provider / model_id 分列
|
||||
).toBeDefined();
|
||||
});
|
||||
|
||||
it("--provider 显式指定分组:同名上游 id 与预置条目互不冲突(各自独立条目)", async () => {
|
||||
it("--provider picks the grouping explicitly: a same-name upstream id does not clash with the preset entry (independent entries)", async () => {
|
||||
const add = await runModel([
|
||||
"add",
|
||||
"--model-id",
|
||||
@@ -167,7 +167,7 @@ describe("penguin config model add/list(--root 与 provider / model_id 分列
|
||||
expect(list.out.split("\n").some((l) => /anthropic\s+claude-sonnet-4-6/.test(l))).toBe(true);
|
||||
});
|
||||
|
||||
it("client_type 缺省按分组语义(PRN-021):custom / 自建 / 网关落 openai,一方厂商不落", async () => {
|
||||
it("client_type defaults by grouping semantics (PRN-021): custom / self-hosted / gateway get openai, first-party providers get none", async () => {
|
||||
// custom (catalog inference fails) and self-hosted groups (--provider not a catalog value): default to client_type=openai.
|
||||
await runModel(["add", "--model-id", "my-openai-proxy", "--root", tmpRoot]);
|
||||
await runModel(["add", "--model-id", "in-house-1", "--provider", "mylab", "--root", tmpRoot]);
|
||||
@@ -217,7 +217,7 @@ describe("penguin config model add/list(--root 与 provider / model_id 分列
|
||||
expect(by("mylab", "special-1").client_type).toBe("verbatim-type");
|
||||
});
|
||||
|
||||
it("model default 经 --root 指定根目录设置默认模型(--model-id 上游 id + --provider 成对)", async () => {
|
||||
it("model default sets the default model under the --root data root (--model-id upstream id + --provider as a pair)", async () => {
|
||||
const set = await runModel([
|
||||
"default",
|
||||
"--model-id",
|
||||
@@ -241,14 +241,14 @@ describe("penguin config model add/list(--root 与 provider / model_id 分列
|
||||
});
|
||||
});
|
||||
|
||||
describe("model default/vision:--provider 必填,(provider, model_id) 成对引用", () => {
|
||||
it("缺 --provider:commander 用法报错,非零退出码", async () => {
|
||||
describe("model default/vision: --provider is required, (provider, model_id) pair reference", () => {
|
||||
it("missing --provider: commander usage error, nonzero exit code", async () => {
|
||||
const bad = await runModel(["default", "--model-id", "deepseek-v4-flash", "--root", tmpRoot]);
|
||||
expect(bad.code).not.toBe(0);
|
||||
expect(bad.err).toContain("--provider");
|
||||
});
|
||||
|
||||
it("引用落空:成对引用不在 models 中,报错带成对引用与 model list 提示", async () => {
|
||||
it("dangling reference: the pair is not in models; the error carries the pair reference and a model list hint", async () => {
|
||||
const bad = await runModel([
|
||||
"default",
|
||||
"--model-id",
|
||||
@@ -276,7 +276,7 @@ describe("model default/vision:--provider 必填,(provider, model_id) 成对
|
||||
expect(wrongGroup.err).toContain("penguin config model list");
|
||||
});
|
||||
|
||||
it("model vision 成对引用命中:设置视觉模型(落盘内联表)", async () => {
|
||||
it("model vision pair reference hit: sets the vision model (written as an inline table)", async () => {
|
||||
const ok = await runModel([
|
||||
"vision",
|
||||
"--model-id",
|
||||
|
||||
Reference in New Issue
Block a user