feat(opencode-go): add model requirements for go-tier models
This commit is contained in:
@@ -12,6 +12,7 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
||||||
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
||||||
@@ -45,37 +46,29 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
librarian: {
|
librarian: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{ providers: ["zai-coding-plan"], model: "glm-4.7" },
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
{ providers: ["opencode"], model: "glm-4.7-free" },
|
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
||||||
{
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
model: "claude-sonnet-4-5",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
explore: {
|
explore: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
||||||
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
||||||
{ providers: ["opencode"], model: "gpt-5-nano" },
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"multimodal-looker": {
|
"multimodal-looker": {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{ providers: ["openai", "opencode"], model: "gpt-5.4", variant: "medium" },
|
||||||
providers: ["openai", "opencode"],
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
model: "gpt-5.4",
|
|
||||||
variant: "medium",
|
|
||||||
},
|
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3-flash",
|
|
||||||
},
|
|
||||||
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
||||||
{ providers: ["opencode"], model: "gpt-5-nano" },
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
],
|
],
|
||||||
@@ -93,6 +86,7 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "gpt-5.4",
|
model: "gpt-5.4",
|
||||||
variant: "high",
|
variant: "high",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
{
|
{
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3.1-pro",
|
model: "gemini-3.1-pro",
|
||||||
@@ -106,17 +100,8 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
{
|
|
||||||
providers: ["openai", "github-copilot", "opencode"],
|
|
||||||
model: "gpt-5.4",
|
|
||||||
variant: "high",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3.1-pro",
|
|
||||||
variant: "high",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
momus: {
|
momus: {
|
||||||
@@ -136,158 +121,156 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "gemini-3.1-pro",
|
model: "gemini-3.1-pro",
|
||||||
variant: "high",
|
variant: "high",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
atlas: {
|
atlas: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
||||||
{
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
|
||||||
model: "claude-sonnet-4-5",
|
|
||||||
},
|
|
||||||
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3.1-pro",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CLI_CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> =
|
export const CLI_CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
||||||
{
|
"visual-engineering": {
|
||||||
"visual-engineering": {
|
fallbackChain: [
|
||||||
fallbackChain: [
|
{
|
||||||
{
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
model: "gemini-3.1-pro",
|
||||||
model: "gemini-3.1-pro",
|
variant: "high",
|
||||||
variant: "high",
|
},
|
||||||
},
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
||||||
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
{
|
||||||
{
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
model: "claude-opus-4-6",
|
||||||
model: "claude-opus-4-6",
|
variant: "max",
|
||||||
variant: "max",
|
},
|
||||||
},
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ultrabrain: {
|
ultrabrain: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{
|
||||||
providers: ["openai", "opencode"],
|
providers: ["openai", "opencode"],
|
||||||
model: "gpt-5.3-codex",
|
model: "gpt-5.3-codex",
|
||||||
variant: "xhigh",
|
variant: "xhigh",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3.1-pro",
|
model: "gemini-3.1-pro",
|
||||||
variant: "high",
|
variant: "high",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
],
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
},
|
],
|
||||||
deep: {
|
},
|
||||||
fallbackChain: [
|
deep: {
|
||||||
{
|
fallbackChain: [
|
||||||
providers: ["openai", "opencode"],
|
{
|
||||||
model: "gpt-5.3-codex",
|
providers: ["openai", "opencode"],
|
||||||
variant: "medium",
|
model: "gpt-5.3-codex",
|
||||||
},
|
variant: "medium",
|
||||||
{
|
},
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{
|
||||||
model: "claude-opus-4-6",
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
variant: "max",
|
model: "claude-opus-4-6",
|
||||||
},
|
variant: "max",
|
||||||
{
|
},
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
{
|
||||||
model: "gemini-3.1-pro",
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
variant: "high",
|
model: "gemini-3.1-pro",
|
||||||
},
|
variant: "high",
|
||||||
],
|
},
|
||||||
requiresModel: "gpt-5.3-codex",
|
],
|
||||||
},
|
requiresModel: "gpt-5.3-codex",
|
||||||
artistry: {
|
},
|
||||||
fallbackChain: [
|
artistry: {
|
||||||
{
|
fallbackChain: [
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
{
|
||||||
model: "gemini-3.1-pro",
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
variant: "high",
|
model: "gemini-3.1-pro",
|
||||||
},
|
variant: "high",
|
||||||
{
|
},
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{
|
||||||
model: "claude-opus-4-6",
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
variant: "max",
|
model: "claude-opus-4-6",
|
||||||
},
|
variant: "max",
|
||||||
{
|
},
|
||||||
providers: ["openai", "github-copilot", "opencode"],
|
{
|
||||||
model: "gpt-5.4",
|
providers: ["openai", "github-copilot", "opencode"],
|
||||||
},
|
model: "gpt-5.4",
|
||||||
],
|
},
|
||||||
requiresModel: "gemini-3.1-pro",
|
],
|
||||||
},
|
requiresModel: "gemini-3.1-pro",
|
||||||
quick: {
|
},
|
||||||
fallbackChain: [
|
quick: {
|
||||||
{
|
fallbackChain: [
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{
|
||||||
model: "claude-haiku-4-5",
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
},
|
model: "claude-haiku-4-5",
|
||||||
{
|
},
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
{
|
||||||
model: "gemini-3-flash",
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
},
|
model: "gemini-3-flash",
|
||||||
{ providers: ["opencode"], model: "gpt-5-nano" },
|
},
|
||||||
],
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
},
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
"unspecified-low": {
|
],
|
||||||
fallbackChain: [
|
},
|
||||||
{
|
"unspecified-low": {
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
fallbackChain: [
|
||||||
model: "claude-sonnet-4-5",
|
{
|
||||||
},
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
{
|
model: "claude-sonnet-4-5",
|
||||||
providers: ["openai", "opencode"],
|
},
|
||||||
model: "gpt-5.3-codex",
|
{
|
||||||
variant: "medium",
|
providers: ["openai", "opencode"],
|
||||||
},
|
model: "gpt-5.3-codex",
|
||||||
{
|
variant: "medium",
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
},
|
||||||
model: "gemini-3-flash",
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
},
|
{
|
||||||
],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
},
|
model: "gemini-3-flash",
|
||||||
"unspecified-high": {
|
},
|
||||||
fallbackChain: [
|
],
|
||||||
{
|
},
|
||||||
providers: ["openai", "github-copilot", "opencode"],
|
"unspecified-high": {
|
||||||
model: "gpt-5.4",
|
fallbackChain: [
|
||||||
variant: "high",
|
{
|
||||||
},
|
providers: ["openai", "github-copilot", "opencode"],
|
||||||
{
|
model: "gpt-5.4",
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
variant: "high",
|
||||||
model: "claude-opus-4-6",
|
},
|
||||||
variant: "max",
|
{
|
||||||
},
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
model: "claude-opus-4-6",
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
variant: "max",
|
||||||
{ providers: ["opencode"], model: "kimi-k2.5" },
|
},
|
||||||
],
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
||||||
},
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
writing: {
|
{ providers: ["opencode"], model: "kimi-k2.5" },
|
||||||
fallbackChain: [
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
],
|
||||||
{
|
},
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
writing: {
|
||||||
model: "gemini-3-flash",
|
fallbackChain: [
|
||||||
},
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
{
|
{
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "claude-sonnet-4-5",
|
model: "gemini-3-flash",
|
||||||
},
|
},
|
||||||
],
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
},
|
{
|
||||||
};
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
|
model: "claude-sonnet-4-5",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
|||||||
const sisyphus = AGENT_MODEL_REQUIREMENTS["sisyphus"]
|
const sisyphus = AGENT_MODEL_REQUIREMENTS["sisyphus"]
|
||||||
|
|
||||||
// #when - accessing Sisyphus requirement
|
// #when - accessing Sisyphus requirement
|
||||||
// #then - fallbackChain has 6 entries with correct ordering
|
// #then - fallbackChain has 7 entries with correct ordering
|
||||||
expect(sisyphus).toBeDefined()
|
expect(sisyphus).toBeDefined()
|
||||||
expect(sisyphus.fallbackChain).toBeArray()
|
expect(sisyphus.fallbackChain).toBeArray()
|
||||||
expect(sisyphus.fallbackChain).toHaveLength(6)
|
expect(sisyphus.fallbackChain).toHaveLength(7)
|
||||||
expect(sisyphus.requiresAnyModel).toBe(true)
|
expect(sisyphus.requiresAnyModel).toBe(true)
|
||||||
|
|
||||||
const primary = sisyphus.fallbackChain[0]
|
const primary = sisyphus.fallbackChain[0]
|
||||||
@@ -40,35 +40,54 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
|||||||
expect(primary.variant).toBe("max")
|
expect(primary.variant).toBe("max")
|
||||||
|
|
||||||
const second = sisyphus.fallbackChain[1]
|
const second = sisyphus.fallbackChain[1]
|
||||||
expect(second.providers).toEqual(["kimi-for-coding"])
|
expect(second.providers).toEqual(["opencode-go"])
|
||||||
expect(second.model).toBe("k2p5")
|
expect(second.model).toBe("kimi-k2.5")
|
||||||
|
|
||||||
const third = sisyphus.fallbackChain[2]
|
const third = sisyphus.fallbackChain[2]
|
||||||
expect(third.model).toBe("kimi-k2.5")
|
expect(third.providers).toEqual(["kimi-for-coding"])
|
||||||
|
expect(third.model).toBe("k2p5")
|
||||||
|
|
||||||
const fourth = sisyphus.fallbackChain[3]
|
const fourth = sisyphus.fallbackChain[3]
|
||||||
expect(fourth.providers).toContain("openai")
|
expect(fourth.model).toBe("kimi-k2.5")
|
||||||
expect(fourth.model).toBe("gpt-5.4")
|
|
||||||
expect(fourth.variant).toBe("medium")
|
|
||||||
|
|
||||||
const last = sisyphus.fallbackChain[5]
|
const fifth = sisyphus.fallbackChain[4]
|
||||||
|
expect(fifth.providers).toContain("openai")
|
||||||
|
expect(fifth.model).toBe("gpt-5.4")
|
||||||
|
expect(fifth.variant).toBe("medium")
|
||||||
|
|
||||||
|
const sixth = sisyphus.fallbackChain[5]
|
||||||
|
expect(sixth.providers[0]).toBe("zai-coding-plan")
|
||||||
|
expect(sixth.model).toBe("glm-5")
|
||||||
|
|
||||||
|
const last = sisyphus.fallbackChain[6]
|
||||||
expect(last.providers[0]).toBe("opencode")
|
expect(last.providers[0]).toBe("opencode")
|
||||||
expect(last.model).toBe("big-pickle")
|
expect(last.model).toBe("big-pickle")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("librarian has valid fallbackChain with gemini-3-flash as primary", () => {
|
test("librarian has valid fallbackChain with opencode-go/minimax-m2.5 as primary", () => {
|
||||||
// given - librarian agent requirement
|
// given - librarian agent requirement
|
||||||
const librarian = AGENT_MODEL_REQUIREMENTS["librarian"]
|
const librarian = AGENT_MODEL_REQUIREMENTS["librarian"]
|
||||||
|
|
||||||
// when - accessing librarian requirement
|
// when - accessing librarian requirement
|
||||||
// then - fallbackChain exists with gemini-3-flash as first entry
|
// then - fallbackChain exists with opencode-go/minimax-m2.5 as first entry
|
||||||
expect(librarian).toBeDefined()
|
expect(librarian).toBeDefined()
|
||||||
expect(librarian.fallbackChain).toBeArray()
|
expect(librarian.fallbackChain).toBeArray()
|
||||||
expect(librarian.fallbackChain.length).toBeGreaterThan(0)
|
expect(librarian.fallbackChain.length).toBeGreaterThan(0)
|
||||||
|
|
||||||
const primary = librarian.fallbackChain[0]
|
const primary = librarian.fallbackChain[0]
|
||||||
expect(primary.providers[0]).toBe("google")
|
expect(primary.providers[0]).toBe("opencode-go")
|
||||||
expect(primary.model).toBe("gemini-3-flash")
|
expect(primary.model).toBe("minimax-m2.5")
|
||||||
|
|
||||||
|
const second = librarian.fallbackChain[1]
|
||||||
|
expect(second.providers[0]).toBe("opencode")
|
||||||
|
expect(second.model).toBe("minimax-m2.5-free")
|
||||||
|
|
||||||
|
const tertiary = librarian.fallbackChain[2]
|
||||||
|
expect(tertiary.providers).toContain("anthropic")
|
||||||
|
expect(tertiary.model).toBe("claude-haiku-4-5")
|
||||||
|
|
||||||
|
const quaternary = librarian.fallbackChain[3]
|
||||||
|
expect(quaternary.model).toBe("gpt-5-nano")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("explore has valid fallbackChain with grok-code-fast-1 as primary", () => {
|
test("explore has valid fallbackChain with grok-code-fast-1 as primary", () => {
|
||||||
@@ -76,26 +95,30 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
|||||||
const explore = AGENT_MODEL_REQUIREMENTS["explore"]
|
const explore = AGENT_MODEL_REQUIREMENTS["explore"]
|
||||||
|
|
||||||
// when - accessing explore requirement
|
// when - accessing explore requirement
|
||||||
// then - fallbackChain: grok → minimax-free → haiku → nano
|
// then - fallbackChain: grok → opencode-go/minimax → minimax-free → haiku → nano
|
||||||
expect(explore).toBeDefined()
|
expect(explore).toBeDefined()
|
||||||
expect(explore.fallbackChain).toBeArray()
|
expect(explore.fallbackChain).toBeArray()
|
||||||
expect(explore.fallbackChain).toHaveLength(4)
|
expect(explore.fallbackChain).toHaveLength(5)
|
||||||
|
|
||||||
const primary = explore.fallbackChain[0]
|
const primary = explore.fallbackChain[0]
|
||||||
expect(primary.providers).toContain("github-copilot")
|
expect(primary.providers).toContain("github-copilot")
|
||||||
expect(primary.model).toBe("grok-code-fast-1")
|
expect(primary.model).toBe("grok-code-fast-1")
|
||||||
|
|
||||||
const secondary = explore.fallbackChain[1]
|
const secondary = explore.fallbackChain[1]
|
||||||
expect(secondary.providers).toContain("opencode")
|
expect(secondary.providers).toContain("opencode-go")
|
||||||
expect(secondary.model).toBe("minimax-m2.5-free")
|
expect(secondary.model).toBe("minimax-m2.5")
|
||||||
|
|
||||||
const tertiary = explore.fallbackChain[2]
|
const tertiary = explore.fallbackChain[2]
|
||||||
expect(tertiary.providers).toContain("anthropic")
|
expect(tertiary.providers).toContain("opencode")
|
||||||
expect(tertiary.model).toBe("claude-haiku-4-5")
|
expect(tertiary.model).toBe("minimax-m2.5-free")
|
||||||
|
|
||||||
const quaternary = explore.fallbackChain[3]
|
const quaternary = explore.fallbackChain[3]
|
||||||
expect(quaternary.providers).toContain("opencode")
|
expect(quaternary.providers).toContain("anthropic")
|
||||||
expect(quaternary.model).toBe("gpt-5-nano")
|
expect(quaternary.model).toBe("claude-haiku-4-5")
|
||||||
|
|
||||||
|
const fifth = explore.fallbackChain[4]
|
||||||
|
expect(fifth.providers).toContain("opencode")
|
||||||
|
expect(fifth.model).toBe("gpt-5-nano")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("multimodal-looker has valid fallbackChain with gpt-5.4 as primary", () => {
|
test("multimodal-looker has valid fallbackChain with gpt-5.4 as primary", () => {
|
||||||
@@ -103,22 +126,24 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
|||||||
const multimodalLooker = AGENT_MODEL_REQUIREMENTS["multimodal-looker"]
|
const multimodalLooker = AGENT_MODEL_REQUIREMENTS["multimodal-looker"]
|
||||||
|
|
||||||
// when - accessing multimodal-looker requirement
|
// when - accessing multimodal-looker requirement
|
||||||
// then - fallbackChain: gpt-5.4 -> k2p5 -> gemini-3-flash -> glm-4.6v -> gpt-5-nano
|
// then - fallbackChain: gpt-5.4 -> opencode-go/kimi-k2.5 -> glm-4.6v -> gpt-5-nano
|
||||||
expect(multimodalLooker).toBeDefined()
|
expect(multimodalLooker).toBeDefined()
|
||||||
expect(multimodalLooker.fallbackChain).toBeArray()
|
expect(multimodalLooker.fallbackChain).toBeArray()
|
||||||
expect(multimodalLooker.fallbackChain).toHaveLength(5)
|
expect(multimodalLooker.fallbackChain).toHaveLength(4)
|
||||||
|
|
||||||
const primary = multimodalLooker.fallbackChain[0]
|
const primary = multimodalLooker.fallbackChain[0]
|
||||||
expect(primary.providers).toEqual(["openai", "opencode"])
|
expect(primary.providers).toEqual(["openai", "opencode"])
|
||||||
expect(primary.model).toBe("gpt-5.4")
|
expect(primary.model).toBe("gpt-5.4")
|
||||||
expect(primary.variant).toBe("medium")
|
expect(primary.variant).toBe("medium")
|
||||||
|
|
||||||
const secondary = multimodalLooker.fallbackChain[1]
|
const secondary = multimodalLooker.fallbackChain[1]
|
||||||
expect(secondary.providers).toEqual(["kimi-for-coding"])
|
expect(secondary.providers).toEqual(["opencode-go"])
|
||||||
expect(secondary.model).toBe("k2p5")
|
expect(secondary.model).toBe("kimi-k2.5")
|
||||||
|
|
||||||
const tertiary = multimodalLooker.fallbackChain[2]
|
const tertiary = multimodalLooker.fallbackChain[2]
|
||||||
expect(tertiary.model).toBe("gemini-3-flash")
|
expect(tertiary.model).toBe("glm-4.6v")
|
||||||
const last = multimodalLooker.fallbackChain[4]
|
|
||||||
|
const last = multimodalLooker.fallbackChain[3]
|
||||||
expect(last.providers).toEqual(["openai", "github-copilot", "opencode"])
|
expect(last.providers).toEqual(["openai", "github-copilot", "opencode"])
|
||||||
expect(last.model).toBe("gpt-5-nano")
|
expect(last.model).toBe("gpt-5-nano")
|
||||||
})
|
})
|
||||||
@@ -186,8 +211,8 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
|||||||
expect(primary.providers[0]).toBe("anthropic")
|
expect(primary.providers[0]).toBe("anthropic")
|
||||||
|
|
||||||
const secondary = atlas.fallbackChain[1]
|
const secondary = atlas.fallbackChain[1]
|
||||||
expect(secondary.model).toBe("gpt-5.4")
|
expect(secondary.model).toBe("kimi-k2.5")
|
||||||
expect(secondary.variant).toBe("medium")
|
expect(secondary.providers[0]).toBe("opencode-go")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("hephaestus supports openai, github-copilot, venice, and opencode providers", () => {
|
test("hephaestus supports openai, github-copilot, venice, and opencode providers", () => {
|
||||||
@@ -276,10 +301,10 @@ describe("CATEGORY_MODEL_REQUIREMENTS", () => {
|
|||||||
const visualEngineering = CATEGORY_MODEL_REQUIREMENTS["visual-engineering"]
|
const visualEngineering = CATEGORY_MODEL_REQUIREMENTS["visual-engineering"]
|
||||||
|
|
||||||
// when - accessing visual-engineering requirement
|
// when - accessing visual-engineering requirement
|
||||||
// then - fallbackChain: gemini-3.1-pro(high) → glm-5 → opus-4-6(max)
|
// then - fallbackChain: gemini-3.1-pro(high) → glm-5 → opus-4-6(max) → opencode-go/glm-5 → k2p5
|
||||||
expect(visualEngineering).toBeDefined()
|
expect(visualEngineering).toBeDefined()
|
||||||
expect(visualEngineering.fallbackChain).toBeArray()
|
expect(visualEngineering.fallbackChain).toBeArray()
|
||||||
expect(visualEngineering.fallbackChain).toHaveLength(3)
|
expect(visualEngineering.fallbackChain).toHaveLength(5)
|
||||||
|
|
||||||
const primary = visualEngineering.fallbackChain[0]
|
const primary = visualEngineering.fallbackChain[0]
|
||||||
expect(primary.providers[0]).toBe("google")
|
expect(primary.providers[0]).toBe("google")
|
||||||
@@ -294,6 +319,13 @@ describe("CATEGORY_MODEL_REQUIREMENTS", () => {
|
|||||||
expect(third.model).toBe("claude-opus-4-6")
|
expect(third.model).toBe("claude-opus-4-6")
|
||||||
expect(third.variant).toBe("max")
|
expect(third.variant).toBe("max")
|
||||||
|
|
||||||
|
const fourth = visualEngineering.fallbackChain[3]
|
||||||
|
expect(fourth.providers[0]).toBe("opencode-go")
|
||||||
|
expect(fourth.model).toBe("glm-5")
|
||||||
|
|
||||||
|
const fifth = visualEngineering.fallbackChain[4]
|
||||||
|
expect(fifth.providers[0]).toBe("kimi-for-coding")
|
||||||
|
expect(fifth.model).toBe("k2p5")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("quick has valid fallbackChain with claude-haiku-4-5 as primary", () => {
|
test("quick has valid fallbackChain with claude-haiku-4-5 as primary", () => {
|
||||||
@@ -368,18 +400,22 @@ describe("CATEGORY_MODEL_REQUIREMENTS", () => {
|
|||||||
const writing = CATEGORY_MODEL_REQUIREMENTS["writing"]
|
const writing = CATEGORY_MODEL_REQUIREMENTS["writing"]
|
||||||
|
|
||||||
// when - accessing writing requirement
|
// when - accessing writing requirement
|
||||||
// then - fallbackChain: gemini-3-flash -> claude-sonnet-4-6
|
// then - fallbackChain: gemini-3-flash -> kimi-k2.5 -> claude-sonnet-4-6
|
||||||
expect(writing).toBeDefined()
|
expect(writing).toBeDefined()
|
||||||
expect(writing.fallbackChain).toBeArray()
|
expect(writing.fallbackChain).toBeArray()
|
||||||
expect(writing.fallbackChain).toHaveLength(2)
|
expect(writing.fallbackChain).toHaveLength(3)
|
||||||
|
|
||||||
const primary = writing.fallbackChain[0]
|
const primary = writing.fallbackChain[0]
|
||||||
expect(primary.model).toBe("gemini-3-flash")
|
expect(primary.model).toBe("gemini-3-flash")
|
||||||
expect(primary.providers[0]).toBe("google")
|
expect(primary.providers[0]).toBe("google")
|
||||||
|
|
||||||
const second = writing.fallbackChain[1]
|
const second = writing.fallbackChain[1]
|
||||||
expect(second.model).toBe("claude-sonnet-4-6")
|
expect(second.model).toBe("kimi-k2.5")
|
||||||
expect(second.providers[0]).toBe("anthropic")
|
expect(second.providers[0]).toBe("opencode-go")
|
||||||
|
|
||||||
|
const third = writing.fallbackChain[2]
|
||||||
|
expect(third.model).toBe("claude-sonnet-4-6")
|
||||||
|
expect(third.providers[0]).toBe("anthropic")
|
||||||
})
|
})
|
||||||
|
|
||||||
test("all 8 categories have valid fallbackChain arrays", () => {
|
test("all 8 categories have valid fallbackChain arrays", () => {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
{
|
{
|
||||||
providers: [
|
providers: [
|
||||||
@@ -66,21 +67,21 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
librarian: {
|
librarian: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3-flash",
|
|
||||||
},
|
|
||||||
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
||||||
{ providers: ["opencode"], model: "big-pickle" },
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
||||||
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
explore: {
|
explore: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
||||||
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
||||||
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
||||||
{ providers: ["opencode"], model: "gpt-5-nano" },
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
@@ -88,21 +89,10 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
},
|
},
|
||||||
"multimodal-looker": {
|
"multimodal-looker": {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{ providers: ["openai", "opencode"], model: "gpt-5.4", variant: "medium" },
|
||||||
providers: ["openai", "opencode"],
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
model: "gpt-5.4",
|
|
||||||
variant: "medium",
|
|
||||||
},
|
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3-flash",
|
|
||||||
},
|
|
||||||
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
||||||
{
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5-nano" },
|
||||||
providers: ["openai", "github-copilot", "opencode"],
|
|
||||||
model: "gpt-5-nano",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
prometheus: {
|
prometheus: {
|
||||||
@@ -117,6 +107,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "gpt-5.4",
|
model: "gpt-5.4",
|
||||||
variant: "high",
|
variant: "high",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
{
|
{
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3.1-pro",
|
model: "gemini-3.1-pro",
|
||||||
@@ -130,16 +121,8 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
{
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
providers: ["openai", "github-copilot", "opencode"],
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
model: "gpt-5.4",
|
|
||||||
variant: "high",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3.1-pro",
|
|
||||||
variant: "high",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
momus: {
|
momus: {
|
||||||
@@ -159,28 +142,20 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "gemini-3.1-pro",
|
model: "gemini-3.1-pro",
|
||||||
variant: "high",
|
variant: "high",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
atlas: {
|
atlas: {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
model: "claude-sonnet-4-6",
|
|
||||||
},
|
|
||||||
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"sisyphus-junior": {
|
"sisyphus-junior": {
|
||||||
fallbackChain: [
|
fallbackChain: [
|
||||||
{
|
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
model: "claude-sonnet-4-6",
|
{ providers: ["opencode"], model: "big-pickle" },
|
||||||
},
|
|
||||||
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
||||||
{
|
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
|
||||||
model: "gemini-3-flash",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -199,6 +174,8 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ultrabrain: {
|
ultrabrain: {
|
||||||
@@ -218,6 +195,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "claude-opus-4-6",
|
model: "claude-opus-4-6",
|
||||||
variant: "max",
|
variant: "max",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
deep: {
|
deep: {
|
||||||
@@ -266,6 +244,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3-flash",
|
model: "gemini-3-flash",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
||||||
{ providers: ["opencode"], model: "gpt-5-nano" },
|
{ providers: ["opencode"], model: "gpt-5-nano" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -280,6 +259,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
model: "gpt-5.3-codex",
|
model: "gpt-5.3-codex",
|
||||||
variant: "medium",
|
variant: "medium",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
{
|
{
|
||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3-flash",
|
model: "gemini-3-flash",
|
||||||
@@ -300,6 +280,8 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
},
|
},
|
||||||
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
||||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||||
|
{ providers: ["opencode-go"], model: "glm-5" },
|
||||||
|
{ providers: ["opencode"], model: "kimi-k2.5" },
|
||||||
{
|
{
|
||||||
providers: [
|
providers: [
|
||||||
"opencode",
|
"opencode",
|
||||||
@@ -319,6 +301,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
|||||||
providers: ["google", "github-copilot", "opencode"],
|
providers: ["google", "github-copilot", "opencode"],
|
||||||
model: "gemini-3-flash",
|
model: "gemini-3-flash",
|
||||||
},
|
},
|
||||||
|
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||||
{
|
{
|
||||||
providers: ["anthropic", "github-copilot", "opencode"],
|
providers: ["anthropic", "github-copilot", "opencode"],
|
||||||
model: "claude-sonnet-4-6",
|
model: "claude-sonnet-4-6",
|
||||||
|
|||||||
Reference in New Issue
Block a user