-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add GPT-5 verbosity model options to Codex and OpenCode #3944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ import { ServerConfig } from "../../config.ts"; | |
| import { | ||
| CodexResumeCursorSchema, | ||
| CodexSessionRuntimeThreadIdMissingError, | ||
| type CodexSessionRuntimeSendTurnInput, | ||
| makeCodexSessionRuntime, | ||
| type CodexSessionRuntimeError, | ||
| type CodexSessionRuntimeOptions, | ||
|
|
@@ -1535,21 +1536,27 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* ( | |
| input.modelSelection?.instanceId === boundInstanceId | ||
| ? getCodexServiceTierOptionValue(input.modelSelection) | ||
| : undefined; | ||
| const verbosity = | ||
| input.modelSelection?.instanceId === boundInstanceId | ||
| ? getModelSelectionStringOptionValue(input.modelSelection, "verbosity") | ||
| : undefined; | ||
| const turnInput = { | ||
| ...(input.input !== undefined ? { input: input.input } : {}), | ||
| ...(input.modelSelection?.instanceId === boundInstanceId | ||
| ? { model: input.modelSelection.model } | ||
| : {}), | ||
| ...(reasoningEffort | ||
| ? { | ||
| effort: reasoningEffort as EffectCodexSchema.V2TurnStartParams__ReasoningEffort, | ||
| } | ||
| : {}), | ||
| ...(serviceTier ? { serviceTier } : {}), | ||
| ...(verbosity ? { verbosity } : {}), | ||
| ...(input.interactionMode !== undefined ? { interactionMode: input.interactionMode } : {}), | ||
| ...(codexAttachments.length > 0 ? { attachments: codexAttachments } : {}), | ||
| } as CodexSessionRuntimeSendTurnInput & { readonly verbosity?: string }; | ||
| return yield* session.runtime | ||
| .sendTurn({ | ||
| ...(input.input !== undefined ? { input: input.input } : {}), | ||
| ...(input.modelSelection?.instanceId === boundInstanceId | ||
| ? { model: input.modelSelection.model } | ||
| : {}), | ||
| ...(reasoningEffort | ||
| ? { | ||
| effort: reasoningEffort as EffectCodexSchema.V2TurnStartParams__ReasoningEffort, | ||
| } | ||
| : {}), | ||
| ...(serviceTier ? { serviceTier } : {}), | ||
| ...(input.interactionMode !== undefined ? { interactionMode: input.interactionMode } : {}), | ||
| ...(codexAttachments.length > 0 ? { attachments: codexAttachments } : {}), | ||
| }) | ||
| .sendTurn(turnInput) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codex verbosity never reaches turnHigh Severity The Reviewed by Cursor Bugbot for commit 99c307d. Configure here. |
||
| .pipe(Effect.mapError((cause) => mapCodexRuntimeError(input.threadId, "turn/start", cause))); | ||
| }); | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium
Layers/CodexAdapter.ts:1557The
verbosityoption is read frommodelSelectionand placed intoturnInput, butCodexSessionRuntimeSendTurnInputhas noverbosityfield andsendTurnnever forwards it tobuildTurnStartParams. The intersection type castas CodexSessionRuntimeSendTurnInput & { readonly verbosity?: string }only silences the compiler, so selecting a verbosity level has no effect on the Codexturn/startrequest — the value is silently dropped. To make this functional, addverbositytoCodexSessionRuntimeSendTurnInput, destructure it insendTurn, and include it in the params built bybuildTurnStartParams.🤖 Copy this AI Prompt to have your agent fix this: