mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 15:41:33 +00:00
* feat(providers): refresh onboarding defaults to current models * chore: drop changelog edit (release generation owns it)
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import { resolveAgentModelPrimaryValue } from "openclaw/plugin-sdk/provider-onboard";
|
|
import { describe, expect, it } from "vitest";
|
|
import { TOGETHER_MODEL_CATALOG } from "./models.js";
|
|
import { applyTogetherConfig, TOGETHER_DEFAULT_MODEL_REF } from "./onboard.js";
|
|
import manifest from "./openclaw.plugin.json" with { type: "json" };
|
|
|
|
describe("Together onboarding", () => {
|
|
it("applies the manifest catalog, default, and alias", () => {
|
|
const config = applyTogetherConfig({});
|
|
|
|
expect(config.models?.providers?.together?.models.map((model) => model.id)).toEqual(
|
|
TOGETHER_MODEL_CATALOG.map((model) => model.id),
|
|
);
|
|
expect(resolveAgentModelPrimaryValue(config.agents?.defaults?.model)).toBe(
|
|
TOGETHER_DEFAULT_MODEL_REF,
|
|
);
|
|
expect(TOGETHER_DEFAULT_MODEL_REF).toBe(
|
|
`together/${manifest.modelCatalog.providers.together.defaultModel}`,
|
|
);
|
|
expect(TOGETHER_DEFAULT_MODEL_REF).toBe("together/moonshotai/Kimi-K2.6");
|
|
expect(config.agents?.defaults?.models?.[TOGETHER_DEFAULT_MODEL_REF]).toEqual({
|
|
alias: "Together AI",
|
|
});
|
|
});
|
|
});
|