Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"license": "ISC",
"type": "module",
"devDependencies": {
"@openai/codex": "^0.97.0",
"@openai/codex": "^0.98.0",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've invoked generate types - no api changes

"@types/node": "^24.10.1",
"mcp-hello-world": "^1.1.2",
"tsx": "^4.20.6",
Expand Down
8 changes: 0 additions & 8 deletions src/CodexAcpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ import {CodexCommands} from "./CodexCommands";
import type {QuotaMeta} from "./QuotaMeta";
import {logger} from "./Logger";

const ALLOWED_MODEL_IDS = new Set([
"gpt-5.2",
"gpt-5.2-codex",
"gpt-5.1-codex-max",
"gpt-5.1-codex-mini",
]);

export interface SessionState {
sessionId: string,
currentModelId: string,
Expand Down Expand Up @@ -254,7 +247,6 @@ export class CodexAcpServer implements acp.Agent {

private createModelState(availableModels: Model[], selectedModelId: string): SessionModelState {
const allowedModels = availableModels
.filter((model) => ALLOWED_MODEL_IDS.has(model.id))
.flatMap((model) =>
model.supportedReasoningEfforts.map((effort) => ({
modelId: ModelId.fromComponents(model, effort.reasoningEffort).toString(),
Expand Down
10 changes: 10 additions & 0 deletions src/__tests__/CodexACPAgent/data/model-filtering.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@
"name": "GPT-5.2 (low)",
"description": "Allowed by id. Fast effort."
},
{
"modelId": "other-id[medium]",
"name": "gpt-5.2 (medium)",
"description": "Allowed Default effort."
},
{
"modelId": "gpt-5.1-codex-mini[medium]",
"name": "Other (medium)",
"description": "Allowed by id. Default effort."
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we can remove this file completely now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it for now to verify that we don't filter out models

{
"modelId": "gpt-4o[medium]",
"name": "gpt-4o (medium)",
"description": "Allowed. Default effort."
}
]
4 changes: 2 additions & 2 deletions src/__tests__/CodexACPAgent/model-filtering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("Model filtering", () => {
id: "other-id",
model: "gpt-5.2",
displayName: "gpt-5.2",
description: "Looks allowed but id is not.",
description: "Allowed",
supportedReasoningEfforts: [defaultEffort],
defaultReasoningEffort: "medium",
supportsPersonality: false,
Expand All @@ -53,7 +53,7 @@ describe("Model filtering", () => {
id: "gpt-4o",
model: "gpt-4o",
displayName: "gpt-4o",
description: "Not allowed.",
description: "Allowed.",
supportedReasoningEfforts: [defaultEffort],
defaultReasoningEffort: "medium",
supportsPersonality: false,
Expand Down