feat(hephaestus): add generic GPT prompt fallback with model-specific routing
Split monolithic hephaestus.ts into directory with model-specific prompt variants (gpt-5-4.ts, gpt-5-3-codex.ts, gpt.ts) mirroring the sisyphus-junior pattern. Generic gpt.ts uses pre-codex-tuning prompt as fallback for non-specific GPT models. Also adds isGpt5_4Model and isGpt5_3CodexModel helpers to types.ts.
This commit is contained in:
@@ -1,5 +1,28 @@
|
||||
import { describe, test, expect } from "bun:test";
|
||||
import { isGptModel, isGeminiModel } from "./types";
|
||||
import { isGptModel, isGeminiModel, isGpt5_4Model } from "./types";
|
||||
|
||||
describe("isGpt5_4Model", () => {
|
||||
test("detects gpt-5.4 models", () => {
|
||||
expect(isGpt5_4Model("openai/gpt-5.4")).toBe(true);
|
||||
expect(isGpt5_4Model("openai/gpt-5-4")).toBe(true);
|
||||
expect(isGpt5_4Model("openai/gpt-5.4-codex")).toBe(true);
|
||||
expect(isGpt5_4Model("github-copilot/gpt-5.4")).toBe(true);
|
||||
expect(isGpt5_4Model("venice/gpt-5-4")).toBe(true);
|
||||
});
|
||||
|
||||
test("does not match other GPT models", () => {
|
||||
expect(isGpt5_4Model("openai/gpt-5.3-codex")).toBe(false);
|
||||
expect(isGpt5_4Model("openai/gpt-5.2")).toBe(false);
|
||||
expect(isGpt5_4Model("openai/gpt-4o")).toBe(false);
|
||||
expect(isGpt5_4Model("github-copilot/gpt-5.2")).toBe(false);
|
||||
});
|
||||
|
||||
test("does not match non-GPT models", () => {
|
||||
expect(isGpt5_4Model("anthropic/claude-opus-4-6")).toBe(false);
|
||||
expect(isGpt5_4Model("google/gemini-3.1-pro")).toBe(false);
|
||||
expect(isGpt5_4Model("openai/o1")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isGptModel", () => {
|
||||
test("standard openai provider gpt models", () => {
|
||||
|
||||
Reference in New Issue
Block a user