mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
feat(codex): align validation with optional auth.json path; docs mapping; SSE parser cleanup
- Validation text for OpenAiNativeCodex auth path now reflects optional with default to ~/.codex/auth.json - Provider Documentation link: map openai-native-codex -> openai to avoid 404 - Remove unused hasContent in SSE parser to satisfy lint - Verified: cd src && npx vitest run (all tests passed)
This commit is contained in:
parent
658da2c029
commit
7d99ef6afa
14 changed files with 729 additions and 5 deletions
|
|
@ -25,6 +25,7 @@ import {
|
|||
xaiModels,
|
||||
internationalZAiModels,
|
||||
minimaxModels,
|
||||
openAiNativeCodexModels,
|
||||
} from "./providers/index.js"
|
||||
|
||||
/**
|
||||
|
|
@ -134,6 +135,7 @@ export const providerNames = [
|
|||
"moonshot",
|
||||
"minimax",
|
||||
"openai-native",
|
||||
"openai-native-codex",
|
||||
"qwen-code",
|
||||
"roo",
|
||||
"sambanova",
|
||||
|
|
@ -297,6 +299,11 @@ const openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|||
openAiNativeServiceTier: serviceTierSchema.optional(),
|
||||
})
|
||||
|
||||
// ChatGPT Codex (auth.json) variant - uses local OAuth credentials file (path)
|
||||
const openAiNativeCodexSchema = apiModelIdProviderModelSchema.extend({
|
||||
openAiNativeCodexOauthPath: z.string().optional(),
|
||||
})
|
||||
|
||||
const mistralSchema = apiModelIdProviderModelSchema.extend({
|
||||
mistralApiKey: z.string().optional(),
|
||||
mistralCodestralUrl: z.string().optional(),
|
||||
|
|
@ -437,6 +444,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
|
|||
geminiSchema.merge(z.object({ apiProvider: z.literal("gemini") })),
|
||||
geminiCliSchema.merge(z.object({ apiProvider: z.literal("gemini-cli") })),
|
||||
openAiNativeSchema.merge(z.object({ apiProvider: z.literal("openai-native") })),
|
||||
openAiNativeCodexSchema.merge(z.object({ apiProvider: z.literal("openai-native-codex") })),
|
||||
mistralSchema.merge(z.object({ apiProvider: z.literal("mistral") })),
|
||||
deepSeekSchema.merge(z.object({ apiProvider: z.literal("deepseek") })),
|
||||
deepInfraSchema.merge(z.object({ apiProvider: z.literal("deepinfra") })),
|
||||
|
|
@ -478,6 +486,7 @@ export const providerSettingsSchema = z.object({
|
|||
...geminiSchema.shape,
|
||||
...geminiCliSchema.shape,
|
||||
...openAiNativeSchema.shape,
|
||||
...openAiNativeCodexSchema.shape,
|
||||
...mistralSchema.shape,
|
||||
...deepSeekSchema.shape,
|
||||
...deepInfraSchema.shape,
|
||||
|
|
@ -560,6 +569,7 @@ export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
|
|||
bedrock: "apiModelId",
|
||||
vertex: "apiModelId",
|
||||
"openai-native": "openAiModelId",
|
||||
"openai-native-codex": "apiModelId",
|
||||
ollama: "ollamaModelId",
|
||||
lmstudio: "lmStudioModelId",
|
||||
gemini: "apiModelId",
|
||||
|
|
@ -689,6 +699,11 @@ export const MODELS_BY_PROVIDER: Record<
|
|||
label: "OpenAI",
|
||||
models: Object.keys(openAiNativeModels),
|
||||
},
|
||||
"openai-native-codex": {
|
||||
id: "openai-native-codex",
|
||||
label: "OpenAI (ChatGPT Codex)",
|
||||
models: Object.keys(openAiNativeCodexModels),
|
||||
},
|
||||
"qwen-code": { id: "qwen-code", label: "Qwen Code", models: Object.keys(qwenCodeModels) },
|
||||
roo: { id: "roo", label: "Roo Code Cloud", models: [] },
|
||||
sambanova: {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export * from "./mistral.js"
|
|||
export * from "./moonshot.js"
|
||||
export * from "./ollama.js"
|
||||
export * from "./openai.js"
|
||||
export * from "./openai-codex.js"
|
||||
export * from "./openrouter.js"
|
||||
export * from "./qwen-code.js"
|
||||
export * from "./requesty.js"
|
||||
|
|
|
|||
29
packages/types/src/providers/openai-codex.ts
Normal file
29
packages/types/src/providers/openai-codex.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import type { ModelInfo } from "../model.js"
|
||||
|
||||
export type OpenAiNativeCodexModelId = keyof typeof openAiNativeCodexModels
|
||||
|
||||
export const openAiNativeCodexDefaultModelId: OpenAiNativeCodexModelId = "gpt-5"
|
||||
|
||||
export const openAiNativeCodexModels = {
|
||||
"gpt-5": {
|
||||
maxTokens: 128000,
|
||||
contextWindow: 400000,
|
||||
supportsImages: true,
|
||||
supportsPromptCache: true,
|
||||
supportsReasoningEffort: true,
|
||||
reasoningEffort: "medium",
|
||||
description: "GPT-5 via ChatGPT Responses (Codex). Optimized for coding and agentic tasks.",
|
||||
supportsTemperature: false,
|
||||
},
|
||||
"gpt-5-codex": {
|
||||
maxTokens: 128000,
|
||||
contextWindow: 400000,
|
||||
supportsImages: true,
|
||||
supportsPromptCache: true,
|
||||
supportsReasoningEffort: true,
|
||||
reasoningEffort: "medium",
|
||||
description:
|
||||
"GPT-5 Codex via ChatGPT Responses (Codex). A GPT‑5 variant exposed to the client with coding‑oriented defaults.",
|
||||
supportsTemperature: false,
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
|
@ -16,6 +16,7 @@ import {
|
|||
LmStudioHandler,
|
||||
GeminiHandler,
|
||||
OpenAiNativeHandler,
|
||||
OpenAiNativeCodexHandler,
|
||||
DeepSeekHandler,
|
||||
MoonshotHandler,
|
||||
MistralHandler,
|
||||
|
|
@ -142,6 +143,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
|
|||
return new GeminiHandler(options)
|
||||
case "openai-native":
|
||||
return new OpenAiNativeHandler(options)
|
||||
case "openai-native-codex":
|
||||
return new OpenAiNativeCodexHandler(options)
|
||||
case "deepseek":
|
||||
return new DeepSeekHandler(options)
|
||||
case "doubao":
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export { LiteLLMHandler } from "./lite-llm"
|
|||
export { LmStudioHandler } from "./lm-studio"
|
||||
export { MistralHandler } from "./mistral"
|
||||
export { OpenAiNativeHandler } from "./openai-native"
|
||||
export { OpenAiNativeCodexHandler } from "./openai-native-codex"
|
||||
export { OpenAiHandler } from "./openai"
|
||||
export { OpenRouterHandler } from "./openrouter"
|
||||
export { QwenCodeHandler } from "./qwen-code"
|
||||
|
|
|
|||
105
src/api/providers/openai-native-codex.prompt.ts
Normal file
105
src/api/providers/openai-native-codex.prompt.ts
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
export default `You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
|
||||
|
||||
## General
|
||||
|
||||
- The arguments to \`shell\` will be passed to execvp(). Most terminal commands should be prefixed with ["bash", "-lc"].
|
||||
- Always set the \`workdir\` param when using the shell function. Do not use \`cd\` unless absolutely necessary.
|
||||
- When searching for text or files, prefer using \`rg\` or \`rg --files\` respectively because \`rg\` is much faster than alternatives like \`grep\`. (If the \`rg\` command is not found, then use alternatives.)
|
||||
|
||||
## Editing constraints
|
||||
|
||||
- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
|
||||
- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
|
||||
- You may be in a dirty git worktree.
|
||||
* NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
|
||||
* If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
|
||||
* If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
|
||||
* If the changes are in unrelated files, just ignore them and don't revert them.
|
||||
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
|
||||
|
||||
## Plan tool
|
||||
|
||||
When using the planning tool:
|
||||
- Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
|
||||
- Do not make single-step plans.
|
||||
- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
|
||||
|
||||
## Codex CLI harness, sandboxing, and approvals
|
||||
|
||||
The Codex CLI harness supports several different configurations for sandboxing and escalation approvals that the user can choose from.
|
||||
|
||||
Filesystem sandboxing defines which files can be read or written. The options for \`sandbox_mode\` are:
|
||||
- **read-only**: The sandbox only permits reading files.
|
||||
- **workspace-write**: The sandbox permits reading files, and editing files in \`cwd\` and \`writable_roots\`. Editing files in other directories requires approval.
|
||||
- **danger-full-access**: No filesystem sandboxing - all commands are permitted.
|
||||
|
||||
Network sandboxing defines whether network can be accessed without approval. Options for \`network_access\` are:
|
||||
- **restricted**: Requires approval
|
||||
- **enabled**: No approval needed
|
||||
|
||||
Approvals are your mechanism to get user consent to run shell commands without the sandbox. Possible configuration options for \`approval_policy\` are
|
||||
- **untrusted**: The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands.
|
||||
- **on-failure**: The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox.
|
||||
- **on-request**: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the \`shell\` command description.)
|
||||
- **never**: This is a non-interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with \`danger-full-access\`, take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding.
|
||||
|
||||
When you are running with \`approval_policy == on-request\`, and sandboxing enabled, here are scenarios where you'll need to request approval:
|
||||
- You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var)
|
||||
- You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files.
|
||||
- You are running sandboxed and need to run a command that requires network access (e.g. installing packages)
|
||||
- If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the \`with_escalated_permissions\` and \`justification\` parameters - do not message the user before requesting approval for the command.
|
||||
- You are about to take a potentially destructive action such as an \`rm\` or \`git reset\` that the user did not explicitly ask for
|
||||
- (for all of these, you should weigh alternative paths that do not require approval)
|
||||
|
||||
When \`sandbox_mode\` is set to read-only, you'll need to request approval for any command that isn't a read.
|
||||
|
||||
You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace-write, network sandboxing enabled, and approval on-failure.
|
||||
|
||||
Although they introduce friction to the user because your work is paused until the user responds, you should leverage them when necessary to accomplish important work. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals.
|
||||
|
||||
When requesting approval to execute a command that will require escalated privileges:
|
||||
- Provide the \`with_escalated_permissions\` parameter with the boolean value true
|
||||
- Include a short, 1 sentence explanation for why you need to enable \`with_escalated_permissions\` in the justification parameter
|
||||
|
||||
## Special user requests
|
||||
|
||||
- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as \`date\`), you should do so.
|
||||
- If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
|
||||
|
||||
## Presenting your work and final message
|
||||
|
||||
You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.
|
||||
|
||||
- Default: be very concise; friendly coding teammate tone.
|
||||
- Ask only when needed; suggest ideas; mirror the user's style.
|
||||
- For substantial work, summarize clearly; follow final‑answer formatting.
|
||||
- Skip heavy formatting for simple confirmations.
|
||||
- Don't dump large files you've written; reference paths only.
|
||||
- No "save/copy this file" - User is on the same machine.
|
||||
- Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
|
||||
- For code changes:
|
||||
* Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.
|
||||
* If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
|
||||
* When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.
|
||||
- The user does not command execution outputs. When asked to show the output of a command (e.g. \`git show\`), relay the important details in your answer or summarize the key lines so the user understands the result.
|
||||
|
||||
### Final answer structure and style guidelines
|
||||
|
||||
- Plain text; CLI handles styling. Use structure only when it helps scanability.
|
||||
- Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.
|
||||
- Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.
|
||||
- Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.
|
||||
- Code samples or multi-line snippets should be wrapped in fenced code blocks; add a language hint whenever obvious.
|
||||
- Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.
|
||||
- Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no "above/below"; parallel wording.
|
||||
- Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.
|
||||
- Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.
|
||||
- File References: When referencing files in your response, make sure to include the relevant start line and always follow the below rules:
|
||||
* Use inline code to make file paths clickable.
|
||||
* Each reference should have a stand alone path. Even if it's the same file.
|
||||
* Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix.
|
||||
* Line/column (1‑based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
|
||||
* Do not use URIs like file://, vscode://, or https://.
|
||||
* Do not provide range of lines
|
||||
* Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5
|
||||
`
|
||||
470
src/api/providers/openai-native-codex.ts
Normal file
470
src/api/providers/openai-native-codex.ts
Normal file
|
|
@ -0,0 +1,470 @@
|
|||
import type { Anthropic } from "@anthropic-ai/sdk"
|
||||
import { promises as fs } from "node:fs"
|
||||
import os from "node:os"
|
||||
|
||||
import type { ApiHandlerCreateMessageMetadata } from "../index"
|
||||
import { BaseProvider } from "./base-provider"
|
||||
// stream + params
|
||||
import { ApiStream, ApiStreamUsageChunk } from "../transform/stream"
|
||||
import { getModelParams } from "../transform/model-params"
|
||||
// Provider prompt content as a TS string module (no loader required)
|
||||
import codexPromptContent from "./openai-native-codex.prompt"
|
||||
|
||||
import {
|
||||
type ModelInfo,
|
||||
type ReasoningEffortWithMinimal,
|
||||
type ServiceTier,
|
||||
type VerbosityLevel,
|
||||
openAiNativeCodexDefaultModelId,
|
||||
openAiNativeCodexModels,
|
||||
} from "@roo-code/types"
|
||||
|
||||
import type { ApiHandlerOptions } from "../../shared/api"
|
||||
import { calculateApiCostOpenAI } from "../../shared/cost"
|
||||
|
||||
export type OpenAiNativeCodexModel = ReturnType<OpenAiNativeCodexHandler["getModel"]>
|
||||
|
||||
const GPT5_MODEL_PREFIX = "gpt-5"
|
||||
|
||||
/**
|
||||
* OpenAI Native (Codex) provider
|
||||
* - Uses ChatGPT auth.json tokens (no API key)
|
||||
* - Calls ChatGPT Responses endpoint: https://chatgpt.com/backend-api/codex/responses
|
||||
*/
|
||||
export class OpenAiNativeCodexHandler extends BaseProvider {
|
||||
protected options: ApiHandlerOptions
|
||||
private chatgptAccessToken!: string
|
||||
private chatgptAccountId?: string
|
||||
private lastResponseId: string | undefined
|
||||
private lastServiceTier: ServiceTier | undefined
|
||||
|
||||
// Inline-loaded provider prompt (via esbuild text loader for .md files)
|
||||
|
||||
// Provider prompt content is loaded via loadProviderPrompt()
|
||||
|
||||
constructor(options: ApiHandlerOptions) {
|
||||
super()
|
||||
this.options = options
|
||||
if (this.options.enableGpt5ReasoningSummary === undefined) {
|
||||
this.options.enableGpt5ReasoningSummary = true
|
||||
}
|
||||
|
||||
// Credentials are resolved lazily via ensureAuthenticated() on first use.
|
||||
}
|
||||
|
||||
// Normalize usage to Roo's ApiStreamUsageChunk and compute totalCost
|
||||
private normalizeUsage(usage: any, model: OpenAiNativeCodexModel): ApiStreamUsageChunk | undefined {
|
||||
if (!usage) return undefined
|
||||
|
||||
const inputDetails = usage.input_tokens_details ?? usage.prompt_tokens_details
|
||||
const hasCachedTokens = typeof inputDetails?.cached_tokens === "number"
|
||||
const hasCacheMissTokens = typeof inputDetails?.cache_miss_tokens === "number"
|
||||
const cachedFromDetails = hasCachedTokens ? inputDetails.cached_tokens : 0
|
||||
const missFromDetails = hasCacheMissTokens ? inputDetails.cache_miss_tokens : 0
|
||||
|
||||
let totalInputTokens = usage.input_tokens ?? usage.prompt_tokens ?? 0
|
||||
if (totalInputTokens === 0 && inputDetails && (cachedFromDetails > 0 || missFromDetails > 0)) {
|
||||
totalInputTokens = cachedFromDetails + missFromDetails
|
||||
}
|
||||
|
||||
const totalOutputTokens = usage.output_tokens ?? usage.completion_tokens ?? 0
|
||||
const cacheWriteTokens = usage.cache_creation_input_tokens ?? usage.cache_write_tokens ?? 0
|
||||
const cacheReadTokens =
|
||||
usage.cache_read_input_tokens ?? usage.cache_read_tokens ?? usage.cached_tokens ?? cachedFromDetails ?? 0
|
||||
|
||||
const totalCost = calculateApiCostOpenAI(
|
||||
model.info,
|
||||
totalInputTokens,
|
||||
totalOutputTokens,
|
||||
cacheWriteTokens,
|
||||
cacheReadTokens,
|
||||
)
|
||||
|
||||
const reasoningTokens =
|
||||
typeof usage.output_tokens_details?.reasoning_tokens === "number"
|
||||
? usage.output_tokens_details.reasoning_tokens
|
||||
: undefined
|
||||
|
||||
const out: ApiStreamUsageChunk = {
|
||||
type: "usage",
|
||||
inputTokens: totalInputTokens,
|
||||
outputTokens: totalOutputTokens,
|
||||
cacheWriteTokens,
|
||||
cacheReadTokens,
|
||||
...(typeof reasoningTokens === "number" ? { reasoningTokens } : {}),
|
||||
totalCost,
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
private async ensureAuthenticated(): Promise<void> {
|
||||
if (this.chatgptAccessToken) return
|
||||
|
||||
const configured = (this.options as any).openAiNativeCodexOauthPath as string | undefined
|
||||
const defaultPath = "~/.codex/auth.json"
|
||||
const expandHome = (p: string) => p.replace(/^~(?=\/|\\|$)/, os.homedir())
|
||||
const pathToUse = configured && configured.trim() ? configured.trim() : defaultPath
|
||||
const explicitPath = expandHome(pathToUse)
|
||||
|
||||
let raw: string
|
||||
try {
|
||||
raw = await fs.readFile(explicitPath, "utf8")
|
||||
} catch (e: any) {
|
||||
throw new Error(`Failed to load ChatGPT OAuth credentials at ${explicitPath}: ${e?.message || e}`)
|
||||
}
|
||||
|
||||
let j: any
|
||||
try {
|
||||
j = JSON.parse(raw)
|
||||
} catch (e: any) {
|
||||
throw new Error(`Failed to parse ChatGPT OAuth credentials JSON at ${explicitPath}: ${e?.message || e}`)
|
||||
}
|
||||
|
||||
const tokens = (j?.tokens as any) || {}
|
||||
const access = typeof tokens.access_token === "string" ? tokens.access_token : undefined
|
||||
let account = typeof tokens.account_id === "string" ? tokens.account_id : undefined
|
||||
|
||||
if (!account && typeof tokens.id_token === "string") {
|
||||
try {
|
||||
const parts = tokens.id_token.split(".")
|
||||
if (parts.length === 3) {
|
||||
const payload = parts[1]
|
||||
const padded = payload + "=".repeat((4 - (payload.length % 4)) % 4)
|
||||
const claims = JSON.parse(Buffer.from(padded, "base64").toString("utf8"))
|
||||
const auth = claims?.["https://api.openai.com/auth"]
|
||||
if (auth && typeof auth.chatgpt_account_id === "string") {
|
||||
account = auth.chatgpt_account_id
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
if (!access) {
|
||||
throw new Error("ChatGPT OAuth credentials are missing tokens.access_token")
|
||||
}
|
||||
|
||||
this.chatgptAccessToken = access
|
||||
this.chatgptAccountId = account
|
||||
}
|
||||
|
||||
override getModel() {
|
||||
const modelId = this.options.apiModelId
|
||||
const id =
|
||||
modelId && modelId in openAiNativeCodexModels
|
||||
? (modelId as keyof typeof openAiNativeCodexModels)
|
||||
: openAiNativeCodexDefaultModelId
|
||||
const info: ModelInfo = openAiNativeCodexModels[id]
|
||||
|
||||
const params = getModelParams({
|
||||
format: "openai",
|
||||
modelId: id as string,
|
||||
model: info,
|
||||
settings: this.options,
|
||||
})
|
||||
|
||||
const effort =
|
||||
(this.options.reasoningEffort as ReasoningEffortWithMinimal | undefined) ??
|
||||
(info.reasoningEffort as ReasoningEffortWithMinimal | undefined)
|
||||
if (effort) {
|
||||
;(params.reasoning as any) = { reasoning_effort: effort }
|
||||
}
|
||||
|
||||
return { id: id as string, info, ...params, verbosity: params.verbosity }
|
||||
}
|
||||
|
||||
// Expose last response id for conversation continuity consumers (e.g., Task.persistGpt5Metadata)
|
||||
getLastResponseId(): string | undefined {
|
||||
return this.lastResponseId
|
||||
}
|
||||
|
||||
override async *createMessage(
|
||||
systemPrompt: string,
|
||||
messages: Anthropic.Messages.MessageParam[],
|
||||
metadata?: ApiHandlerCreateMessageMetadata,
|
||||
): ApiStream {
|
||||
this.lastServiceTier = undefined
|
||||
const model = this.getModel()
|
||||
await this.ensureAuthenticated()
|
||||
|
||||
// Format full conversation (Responses API expects structured input)
|
||||
const formattedInput: any[] = []
|
||||
// Inject systemPrompt into the first user turn wrapped in <user_instructions> XML tags
|
||||
let injectedUserInstructions = false
|
||||
for (const message of messages) {
|
||||
const role = message.role === "user" ? "user" : "assistant"
|
||||
const content: any[] = []
|
||||
|
||||
if (
|
||||
role === "user" &&
|
||||
!injectedUserInstructions &&
|
||||
typeof systemPrompt === "string" &&
|
||||
systemPrompt.trim().length > 0
|
||||
) {
|
||||
// For ChatGPT Codex (Responses API), the top-level "instructions" payload is fixed and must be
|
||||
// provided from a canonical prompt file. We cannot programmatically modify that contents here.
|
||||
// Therefore, the only supported way to pass the dynamic system prompt is to inject it into the
|
||||
// first user turn wrapped in <user_instructions> ... </user_instructions>.
|
||||
content.push({ type: "input_text", text: `<user_instructions>${systemPrompt}</user_instructions>` })
|
||||
injectedUserInstructions = true
|
||||
}
|
||||
|
||||
if (typeof message.content === "string") {
|
||||
if (role === "user") content.push({ type: "input_text", text: message.content })
|
||||
else content.push({ type: "output_text", text: message.content })
|
||||
} else if (Array.isArray(message.content)) {
|
||||
for (const block of message.content) {
|
||||
if (block.type === "text") {
|
||||
if (role === "user") content.push({ type: "input_text", text: (block as any).text })
|
||||
else content.push({ type: "output_text", text: (block as any).text })
|
||||
} else if (block.type === "image") {
|
||||
const image = block as Anthropic.Messages.ImageBlockParam
|
||||
const imageUrl = `data:${image.source.media_type};base64,${image.source.data}`
|
||||
content.push({ type: "input_image", image_url: imageUrl })
|
||||
}
|
||||
}
|
||||
}
|
||||
if (content.length > 0) formattedInput.push({ role, content })
|
||||
}
|
||||
|
||||
// Use provider-local prompt content for top-level instructions (TS string module)
|
||||
// IMPORTANT: For ChatGPT Codex, we do not modify the "instructions" payload dynamically.
|
||||
// We import a TS string module to keep the default, required contents easy to update as Codex evolves.
|
||||
const codexPrompt = codexPromptContent
|
||||
|
||||
// Codex (chatgpt.com codex/responses) is stateless and does NOT support previous_response_id.
|
||||
// We always send curated prior items in `input` to preserve continuity.
|
||||
const requestBody = this.buildRequestBody(
|
||||
model,
|
||||
formattedInput,
|
||||
codexPrompt,
|
||||
(model as any).verbosity,
|
||||
(model as any).reasoning?.reasoning_effort as ReasoningEffortWithMinimal | undefined,
|
||||
metadata,
|
||||
)
|
||||
|
||||
yield* this.makeResponsesRequest(requestBody, model)
|
||||
}
|
||||
|
||||
private buildRequestBody(
|
||||
model: OpenAiNativeCodexModel,
|
||||
formattedInput: any[],
|
||||
systemPrompt: string,
|
||||
verbosity: any,
|
||||
reasoningEffort: ReasoningEffortWithMinimal | undefined,
|
||||
metadata?: ApiHandlerCreateMessageMetadata,
|
||||
) {
|
||||
// For Codex provider:
|
||||
// - Regular "gpt-5" should default to minimal reasoning unless explicitly overridden in settings.
|
||||
// - The "gpt-5-codex" variant should NOT force minimal; use provided/default effort.
|
||||
let effectiveEffort: ReasoningEffortWithMinimal | undefined = reasoningEffort
|
||||
const explicitEffortProvided = typeof (this.options.reasoningEffort as any) === "string"
|
||||
if (!explicitEffortProvided && model.id === "gpt-5") {
|
||||
effectiveEffort = "minimal"
|
||||
}
|
||||
|
||||
const requestedTier = (this.options.openAiNativeServiceTier as ServiceTier | undefined) || undefined
|
||||
const allowedTierNames = new Set(model.info.tiers?.map((t) => t.name).filter(Boolean) || [])
|
||||
const body: any = {
|
||||
model: model.id,
|
||||
input: formattedInput,
|
||||
stream: true,
|
||||
// ChatGPT Responses requires store=false
|
||||
store: false,
|
||||
// Top-level instructions string passed in by caller (createMessage supplies provider prompt)
|
||||
instructions: systemPrompt,
|
||||
...(effectiveEffort && {
|
||||
reasoning: {
|
||||
effort: effectiveEffort,
|
||||
...(this.options.enableGpt5ReasoningSummary ? { summary: "auto" as const } : {}),
|
||||
},
|
||||
}),
|
||||
// ChatGPT codex/responses does not support previous_response_id (stateless).
|
||||
// Preserve continuity by sending curated prior items in `input`.
|
||||
...(requestedTier && (requestedTier === "default" || allowedTierNames.has(requestedTier))
|
||||
? { service_tier: requestedTier }
|
||||
: {}),
|
||||
}
|
||||
if (model.info.supportsVerbosity === true) {
|
||||
body.text = { verbosity: (verbosity || "medium") as VerbosityLevel }
|
||||
}
|
||||
return body
|
||||
}
|
||||
|
||||
private async *makeResponsesRequest(requestBody: any, model: OpenAiNativeCodexModel): ApiStream {
|
||||
const apiKey = this.chatgptAccessToken
|
||||
const url = "https://chatgpt.com/backend-api/codex/responses"
|
||||
const headers: Record<string, string> = {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
Accept: "text/event-stream",
|
||||
"OpenAI-Beta": "responses=experimental",
|
||||
}
|
||||
if (this.chatgptAccountId) headers["chatgpt-account-id"] = this.chatgptAccountId
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
method: "POST",
|
||||
headers,
|
||||
body: JSON.stringify(requestBody),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const text = await response.text().catch(() => "")
|
||||
const requestId =
|
||||
response.headers.get("x-request-id") || response.headers.get("openai-request-id") || undefined
|
||||
let userMessage: string | undefined
|
||||
try {
|
||||
const parsed = JSON.parse(text)
|
||||
userMessage = parsed?.error?.message || parsed?.message || parsed?.error || undefined
|
||||
} catch {
|
||||
// ignore parse error
|
||||
}
|
||||
const snippet = (text || "").slice(0, 500).replace(/\s+/g, " ").trim()
|
||||
const msg = `[Codex] HTTP ${response.status}${requestId ? ` req ${requestId}` : ""} model=${model.id}: ${userMessage || snippet}`
|
||||
const err = new Error(msg)
|
||||
;(err as any).status = response.status
|
||||
if (requestId) (err as any).requestId = requestId
|
||||
;(err as any).provider = "openai-native-codex"
|
||||
;(err as any).raw = snippet
|
||||
throw err
|
||||
}
|
||||
if (!response.body) {
|
||||
throw new Error("ChatGPT Responses error: No response body")
|
||||
}
|
||||
|
||||
// Stream parse
|
||||
{
|
||||
const reader = response.body.getReader()
|
||||
const decoder = new TextDecoder()
|
||||
let buffer = ""
|
||||
let hasContent = false
|
||||
let sawTextDelta = false
|
||||
let sawReasoningDelta = false
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
const { done, value } = await reader.read()
|
||||
if (done) break
|
||||
|
||||
buffer += decoder.decode(value, { stream: true })
|
||||
const lines = buffer.split("\n")
|
||||
buffer = lines.pop() || ""
|
||||
|
||||
for (const line of lines) {
|
||||
if (line.startsWith("data: ")) {
|
||||
const data = line.slice(6).trim()
|
||||
if (data === "[DONE]") {
|
||||
continue
|
||||
}
|
||||
try {
|
||||
const parsed = JSON.parse(data)
|
||||
// Persist ids/tier when available (parity with openai-native)
|
||||
if (parsed.response?.id) {
|
||||
this.lastResponseId = parsed.response.id
|
||||
}
|
||||
if (parsed.response?.service_tier) {
|
||||
this.lastServiceTier = parsed.response.service_tier as ServiceTier
|
||||
}
|
||||
// Minimal content extraction similar to OpenAI Responses
|
||||
if (parsed?.type === "response.text.delta" && parsed?.delta) {
|
||||
hasContent = true
|
||||
sawTextDelta = true
|
||||
yield { type: "text", text: parsed.delta }
|
||||
} else if (parsed?.type === "response.output_text.delta" && parsed?.delta) {
|
||||
hasContent = true
|
||||
sawTextDelta = true
|
||||
yield { type: "text", text: parsed.delta }
|
||||
} else if (
|
||||
parsed?.type === "response.output_text.done" &&
|
||||
typeof parsed?.text === "string"
|
||||
) {
|
||||
if (!sawTextDelta) {
|
||||
hasContent = true
|
||||
yield { type: "text", text: parsed.text }
|
||||
}
|
||||
} else if (
|
||||
parsed?.type === "response.reasoning_summary_text.delta" &&
|
||||
typeof parsed?.delta === "string"
|
||||
) {
|
||||
hasContent = true
|
||||
sawReasoningDelta = true
|
||||
yield { type: "reasoning", text: parsed.delta }
|
||||
} else if (
|
||||
parsed?.type === "response.reasoning_summary_text.done" &&
|
||||
typeof parsed?.text === "string"
|
||||
) {
|
||||
if (!sawReasoningDelta) {
|
||||
hasContent = true
|
||||
yield { type: "reasoning", text: parsed.text }
|
||||
}
|
||||
} else if (parsed?.response?.output && Array.isArray(parsed.response.output)) {
|
||||
for (const item of parsed.response.output) {
|
||||
if (item.type === "text" && Array.isArray(item.content)) {
|
||||
for (const c of item.content) {
|
||||
if (c?.type === "text" && typeof c.text === "string") {
|
||||
hasContent = true
|
||||
yield { type: "text", text: c.text }
|
||||
}
|
||||
}
|
||||
} else if (item.type === "reasoning" && typeof item.text === "string") {
|
||||
hasContent = true
|
||||
yield { type: "reasoning", text: item.text }
|
||||
}
|
||||
}
|
||||
if (
|
||||
(parsed.type === "response.completed" || parsed.type === "response.done") &&
|
||||
parsed.response?.usage
|
||||
) {
|
||||
const usageData = this.normalizeUsage(parsed.response.usage, model)
|
||||
if (usageData) {
|
||||
yield usageData
|
||||
}
|
||||
}
|
||||
} else if (
|
||||
parsed.type === "response.completed" ||
|
||||
parsed.type === "response.done"
|
||||
) {
|
||||
const usageData = this.normalizeUsage(parsed.response?.usage, model)
|
||||
if (usageData) {
|
||||
yield usageData
|
||||
}
|
||||
} else if (parsed?.usage) {
|
||||
const usageData = this.normalizeUsage(parsed.usage, model)
|
||||
if (usageData) {
|
||||
yield usageData
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// ignore parse errors
|
||||
}
|
||||
} else if (line.trim() && !line.startsWith(":")) {
|
||||
try {
|
||||
const parsed = JSON.parse(line)
|
||||
if (parsed.content || parsed.text || parsed.message) {
|
||||
hasContent = true
|
||||
yield { type: "text", text: parsed.content || parsed.text || parsed.message }
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasContent) {
|
||||
throw new Error(`[Codex] Empty stream: no content received for model=${model.id}`)
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
reader.releaseLock()
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
throw err as Error
|
||||
} finally {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ import {
|
|||
unboundDefaultModelId,
|
||||
litellmDefaultModelId,
|
||||
openAiNativeDefaultModelId,
|
||||
openAiNativeCodexDefaultModelId,
|
||||
anthropicDefaultModelId,
|
||||
doubaoDefaultModelId,
|
||||
claudeCodeDefaultModelId,
|
||||
|
|
@ -85,6 +86,7 @@ import {
|
|||
OpenAICompatible,
|
||||
OpenRouter,
|
||||
QwenCode,
|
||||
OpenAiNativeCodex,
|
||||
Requesty,
|
||||
Roo,
|
||||
SambaNova,
|
||||
|
|
@ -344,6 +346,7 @@ const ApiOptions = ({
|
|||
"claude-code": { field: "apiModelId", default: claudeCodeDefaultModelId },
|
||||
"qwen-code": { field: "apiModelId", default: qwenCodeDefaultModelId },
|
||||
"openai-native": { field: "apiModelId", default: openAiNativeDefaultModelId },
|
||||
"openai-native-codex": { field: "apiModelId", default: openAiNativeCodexDefaultModelId },
|
||||
gemini: { field: "apiModelId", default: geminiDefaultModelId },
|
||||
deepseek: { field: "apiModelId", default: deepSeekDefaultModelId },
|
||||
doubao: { field: "apiModelId", default: doubaoDefaultModelId },
|
||||
|
|
@ -401,6 +404,7 @@ const ApiOptions = ({
|
|||
// Get the URL slug - use custom mapping if available, otherwise use the provider key.
|
||||
const slugs: Record<string, string> = {
|
||||
"openai-native": "openai",
|
||||
"openai-native-codex": "openai-codex",
|
||||
openai: "openai-compatible",
|
||||
}
|
||||
|
||||
|
|
@ -572,6 +576,13 @@ const ApiOptions = ({
|
|||
/>
|
||||
)}
|
||||
|
||||
{selectedProvider === "openai-native-codex" && (
|
||||
<OpenAiNativeCodex
|
||||
apiConfiguration={apiConfiguration}
|
||||
setApiConfigurationField={setApiConfigurationField}
|
||||
/>
|
||||
)}
|
||||
|
||||
{selectedProvider === "mistral" && (
|
||||
<Mistral
|
||||
apiConfiguration={apiConfiguration}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,24 @@ interface ThinkingBudgetProps {
|
|||
modelInfo?: ModelInfo
|
||||
}
|
||||
|
||||
// Helper function to determine if minimal option should be shown
|
||||
const shouldShowMinimalOption = (
|
||||
provider: string | undefined,
|
||||
modelId: string | undefined,
|
||||
supportsEffort: boolean | undefined,
|
||||
): boolean => {
|
||||
// Keep existing behavior for native OpenAI provider
|
||||
const isGpt5Native = provider === "openai-native" && modelId?.startsWith("gpt-5")
|
||||
|
||||
// For ChatGPT Codex provider, only expose "minimal" for the regular gpt-5 model,
|
||||
// not for the "gpt-5-codex" variant
|
||||
const isGpt5CodexRegular = provider === "openai-native-codex" && modelId === "gpt-5"
|
||||
|
||||
const isOpenRouterWithEffort = provider === "openrouter" && supportsEffort === true
|
||||
|
||||
return !!(isGpt5Native || isGpt5CodexRegular || isOpenRouterWithEffort)
|
||||
}
|
||||
|
||||
export const ThinkingBudget = ({ apiConfiguration, setApiConfigurationField, modelInfo }: ThinkingBudgetProps) => {
|
||||
const { t } = useAppTranslation()
|
||||
const { id: selectedModelId } = useSelectedModel(apiConfiguration)
|
||||
|
|
@ -99,11 +117,17 @@ export const ThinkingBudget = ({ apiConfiguration, setApiConfigurationField, mod
|
|||
: (baseAvailableOptions as ReadonlyArray<ReasoningEffortOption>)
|
||||
|
||||
// Default reasoning effort - use model's default if available
|
||||
// GPT-5 models have "medium" as their default in the model configuration
|
||||
// Special-case for ChatGPT Codex "gpt-5": default to "minimal" unless user overrides
|
||||
const modelDefaultReasoningEffort = modelInfo?.reasoningEffort as ReasoningEffortWithMinimal | undefined
|
||||
const defaultReasoningEffort: ReasoningEffortOption = modelInfo?.requiredReasoningEffort
|
||||
? modelDefaultReasoningEffort || "medium"
|
||||
: "disable"
|
||||
// Special-case for ChatGPT Codex "gpt-5": default to "minimal" unless user overrides
|
||||
const defaultReasoningEffort: ReasoningEffortOption =
|
||||
apiConfiguration.apiProvider === "openai-native-codex" &&
|
||||
selectedModelId === "gpt-5" &&
|
||||
isReasoningEffortSupported
|
||||
? "minimal"
|
||||
: modelInfo?.requiredReasoningEffort
|
||||
? modelDefaultReasoningEffort || "medium"
|
||||
: "disable"
|
||||
// Current reasoning effort from settings, or fall back to default
|
||||
const storedReasoningEffort = apiConfiguration.reasoningEffort as ReasoningEffortOption | undefined
|
||||
const currentReasoningEffort: ReasoningEffortOption = storedReasoningEffort || defaultReasoningEffort
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
geminiModels,
|
||||
mistralModels,
|
||||
openAiNativeModels,
|
||||
openAiNativeCodexModels,
|
||||
qwenCodeModels,
|
||||
vertexModels,
|
||||
xaiModels,
|
||||
|
|
@ -34,6 +35,7 @@ export const MODELS_BY_PROVIDER: Partial<Record<ProviderName, Record<string, Mod
|
|||
gemini: geminiModels,
|
||||
mistral: mistralModels,
|
||||
"openai-native": openAiNativeModels,
|
||||
"openai-native-codex": openAiNativeCodexModels,
|
||||
"qwen-code": qwenCodeModels,
|
||||
vertex: vertexModels,
|
||||
xai: xaiModels,
|
||||
|
|
@ -57,6 +59,7 @@ export const PROVIDERS = [
|
|||
{ value: "deepseek", label: "DeepSeek" },
|
||||
{ value: "moonshot", label: "Moonshot" },
|
||||
{ value: "openai-native", label: "OpenAI" },
|
||||
{ value: "openai-native-codex", label: "OpenAI (ChatGPT Codex)" },
|
||||
{ value: "openai", label: "OpenAI Compatible" },
|
||||
{ value: "qwen-code", label: "Qwen Code" },
|
||||
{ value: "vertex", label: "GCP Vertex AI" },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
import React from "react"
|
||||
import { VSCodeTextField, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
|
||||
import { type ProviderSettings } from "@roo-code/types"
|
||||
|
||||
interface OpenAiNativeCodexProps {
|
||||
apiConfiguration: ProviderSettings
|
||||
setApiConfigurationField: (field: keyof ProviderSettings, value: ProviderSettings[keyof ProviderSettings]) => void
|
||||
}
|
||||
|
||||
export const OpenAiNativeCodex: React.FC<OpenAiNativeCodexProps> = ({ apiConfiguration, setApiConfigurationField }) => {
|
||||
const defaultPath = "~/.codex/auth.json"
|
||||
|
||||
const handleInputChange = (e: Event | React.FormEvent<HTMLElement>) => {
|
||||
const element = e.target as HTMLInputElement
|
||||
setApiConfigurationField("openAiNativeCodexOauthPath", element.value)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<div>
|
||||
<VSCodeTextField
|
||||
value={apiConfiguration?.openAiNativeCodexOauthPath || ""}
|
||||
className="w-full mt-1"
|
||||
type="text"
|
||||
onInput={handleInputChange}
|
||||
placeholder={defaultPath}>
|
||||
OAuth Credentials Path
|
||||
</VSCodeTextField>
|
||||
|
||||
<p className="text-xs mt-1 text-vscode-descriptionForeground">
|
||||
Path to your ChatGPT Codex auth.json credentials. Defaults to ~/.codex/auth.json if left empty
|
||||
(Windows: C:\\Users\\USERNAME\\.codex\\auth.json).
|
||||
</p>
|
||||
|
||||
<div className="text-xs text-vscode-descriptionForeground mt-3">
|
||||
ChatGPT Codex uses your ChatGPT web credentials via the official Codex CLI. Authenticate with the
|
||||
Codex CLI so that auth.json is created. If you use a custom location, set the full file path here.
|
||||
</div>
|
||||
|
||||
<div className="text-xs text-vscode-descriptionForeground mt-2">
|
||||
After authentication, Roo will read the access token from auth.json and connect to ChatGPT Responses
|
||||
(Codex).
|
||||
</div>
|
||||
|
||||
<VSCodeLink
|
||||
href="https://chat.openai.com"
|
||||
className="text-vscode-textLink-foreground mt-2 inline-block text-xs">
|
||||
Learn more about ChatGPT
|
||||
</VSCodeLink>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -32,3 +32,4 @@ export { VercelAiGateway } from "./VercelAiGateway"
|
|||
export { DeepInfra } from "./DeepInfra"
|
||||
export { MiniMax } from "./MiniMax"
|
||||
export { Baseten } from "./Baseten"
|
||||
export { OpenAiNativeCodex } from "./OpenAiNativeCodex"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ import {
|
|||
mistralModels,
|
||||
openAiModelInfoSaneDefaults,
|
||||
openAiNativeModels,
|
||||
openAiNativeCodexDefaultModelId,
|
||||
openAiNativeCodexModels,
|
||||
vertexModels,
|
||||
xaiModels,
|
||||
groqModels,
|
||||
|
|
@ -274,6 +276,11 @@ function getSelectedModel({
|
|||
const info = openAiNativeModels[id as keyof typeof openAiNativeModels]
|
||||
return { id, info }
|
||||
}
|
||||
case "openai-native-codex": {
|
||||
const id = apiConfiguration.apiModelId ?? openAiNativeCodexDefaultModelId
|
||||
const info = openAiNativeCodexModels[id as keyof typeof openAiNativeCodexModels]
|
||||
return { id, info }
|
||||
}
|
||||
case "mistral": {
|
||||
const id = apiConfiguration.apiModelId ?? defaultModelId
|
||||
const info = mistralModels[id as keyof typeof mistralModels]
|
||||
|
|
|
|||
|
|
@ -919,7 +919,8 @@
|
|||
"providerNotAllowed": "Provider '{{provider}}' is not allowed by your organization",
|
||||
"modelNotAllowed": "Model '{{model}}' is not allowed for provider '{{provider}}' by your organization",
|
||||
"profileInvalid": "This profile contains a provider or model that is not allowed by your organization",
|
||||
"qwenCodeOauthPath": "You must provide a valid OAuth credentials path."
|
||||
"qwenCodeOauthPath": "You must provide a valid OAuth credentials path.",
|
||||
"openAiNativeCodexOauthPath": "Optional: Path to ChatGPT Codex auth.json. When empty, defaults to ~/.codex/auth.json."
|
||||
},
|
||||
"placeholders": {
|
||||
"apiKey": "Enter API Key...",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue