refactor: 将 modelType openai-responses 重命名为 codex

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-26 22:08:03 +08:00
parent 25c322c8db
commit 2af6fd42c3
12 changed files with 42 additions and 42 deletions

View File

@@ -1347,7 +1347,7 @@ async function* queryModel(
return
}
if (getAPIProvider() === 'openai-responses') {
if (getAPIProvider() === 'codex') {
const { queryModelCodex } = await import('./codex/index.js')
yield* queryModelCodex(messagesForAPI, systemPrompt, filteredTools, signal, options)
return

View File

@@ -13,7 +13,7 @@ function wrapFetchForUsage(base: typeof fetch): typeof fetch {
): Promise<Response> => {
const res = await base(...args)
try {
updateProviderBuckets('openai-responses', openaiAdapter.parseHeaders(res.headers))
updateProviderBuckets('codex', openaiAdapter.parseHeaders(res.headers))
} catch {
// Usage tracking must not affect the request path.
}

View File

@@ -262,7 +262,7 @@ export async function* queryModelCodex(
model,
provider: process.env.CODEX_LOGIN_METHOD === 'chatgpt_subscription'
? 'codex-chatgpt'
: 'openai-responses',
: 'codex',
input: convertMessagesToLangfuse(messagesForAPI, systemPrompt),
output: convertOutputToLangfuse(collectedMessages),
usage: totalUsage,

View File

@@ -57,7 +57,7 @@ const PROVIDER_GENERATION_NAMES: Record<string, string> = {
vertex: 'ChatVertexAnthropic',
foundry: 'ChatFoundry',
openai: 'ChatOpenAI',
'openai-responses': 'ChatOpenAIResponses',
'codex': 'ChatOpenAIResponses',
'codex-chatgpt': 'ChatCodex',
gemini: 'ChatGoogleGenerativeAI',
grok: 'ChatXAI',