feat(agents): add gpt-5.5 native sisyphus support
Route GPT-5.5 through the existing GPT-5.4-native Sisyphus and Hephaestus prompt family while keeping one shared model-family helper. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin"
|
||||
import { isGptModel, isGpt5_4Model } from "../../agents/types"
|
||||
import { isGptModel, isGptNativeSisyphusModel } from "../../agents/types"
|
||||
import {
|
||||
getSessionAgent,
|
||||
resolveRegisteredAgentName,
|
||||
@@ -11,8 +11,8 @@ import { getAgentConfigKey } from "../../shared/agent-display-names"
|
||||
const TOAST_TITLE = "NEVER Use Sisyphus with GPT"
|
||||
const TOAST_MESSAGE = [
|
||||
"Sisyphus works best with Claude Opus, and works fine with Kimi/GLM models.",
|
||||
"Do NOT use Sisyphus with GPT (except GPT-5.4 which has specialized support).",
|
||||
"For GPT models (other than 5.4), always use Hephaestus.",
|
||||
"Do NOT use Sisyphus with GPT (except GPT-5.4 and GPT-5.5 which have specialized support).",
|
||||
"For other GPT models, always use Hephaestus.",
|
||||
].join("\n")
|
||||
function showToast(ctx: PluginInput, sessionID: string): void {
|
||||
ctx.client.tui.showToast({
|
||||
@@ -43,7 +43,7 @@ export function createNoSisyphusGptHook(ctx: PluginInput) {
|
||||
const agentKey = getAgentConfigKey(rawAgent)
|
||||
const modelID = input.model?.modelID
|
||||
|
||||
if (agentKey === "sisyphus" && modelID && isGptModel(modelID) && !isGpt5_4Model(modelID)) {
|
||||
if (agentKey === "sisyphus" && modelID && isGptModel(modelID) && !isGptNativeSisyphusModel(modelID)) {
|
||||
showToast(ctx, input.sessionID)
|
||||
input.agent = resolveRegisteredAgentName("hephaestus") ?? "hephaestus"
|
||||
if (output?.message) {
|
||||
|
||||
@@ -43,7 +43,7 @@ describe("no-sisyphus-gpt hook", () => {
|
||||
expect(showToast.mock.calls[0]?.[0]).toMatchObject({
|
||||
body: {
|
||||
title: "NEVER Use Sisyphus with GPT",
|
||||
message: expect.stringContaining("For GPT models (other than 5.4), always use Hephaestus."),
|
||||
message: expect.stringContaining("For other GPT models, always use Hephaestus."),
|
||||
variant: "error",
|
||||
},
|
||||
})
|
||||
@@ -70,6 +70,27 @@ describe("no-sisyphus-gpt hook", () => {
|
||||
expect(output.message.agent).toBeUndefined()
|
||||
})
|
||||
|
||||
test("does not show toast for gpt-5.5 model (native Sisyphus support)", async () => {
|
||||
// given - sisyphus with gpt-5.5 model (should be allowed)
|
||||
const showToast = spyOn({ fn: async () => ({}) }, "fn")
|
||||
const hook = createNoSisyphusGptHook({
|
||||
client: { tui: { showToast } },
|
||||
} as any)
|
||||
|
||||
const output = createOutput()
|
||||
|
||||
// when - chat.message runs with gpt-5.5
|
||||
await hook["chat.message"]?.({
|
||||
sessionID: "ses_gpt55",
|
||||
agent: SISYPHUS_DISPLAY,
|
||||
model: { providerID: "openai", modelID: "gpt-5.5" },
|
||||
}, output)
|
||||
|
||||
// then - no toast, agent NOT switched to Hephaestus
|
||||
expect(showToast).toHaveBeenCalledTimes(0)
|
||||
expect(output.message.agent).toBeUndefined()
|
||||
})
|
||||
|
||||
test("does not show toast for non-gpt model", async () => {
|
||||
// given - sisyphus with claude model
|
||||
const showToast = spyOn({ fn: async () => ({}) }, "fn")
|
||||
|
||||
Reference in New Issue
Block a user