docs: 更新codex默认模型示例

This commit is contained in:
shaw
2025-09-16 10:36:07 +08:00
parent 51cb92d395
commit 77337bb266
3 changed files with 10 additions and 10 deletions

View File

@@ -480,7 +480,7 @@ gemini # 或其他 Gemini CLI 命令
```toml
model_provider = "crs"
model = "gpt-5"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

View File

@@ -325,15 +325,15 @@ async function refreshAccountToken(accountId) {
throw new Error('Failed to refresh token')
}
// 准备更新数据
// 准备更新数据 - 不要在这里加密,让 updateAccount 统一处理
const updates = {
accessToken: encrypt(newTokens.access_token),
accessToken: newTokens.access_token, // 不加密,让 updateAccount 处理
expiresAt: new Date(newTokens.expiry_date).toISOString()
}
// 如果有新的 ID token也更新它这对于首次未提供 ID Token 的账户特别重要)
if (newTokens.id_token) {
updates.idToken = encrypt(newTokens.id_token)
updates.idToken = newTokens.id_token // 不加密,让 updateAccount 处理
// 如果之前没有 ID Token尝试解析并更新用户信息
if (!account.idToken || account.idToken === '') {
@@ -364,7 +364,7 @@ async function refreshAccountToken(accountId) {
updates.organizationTitle = authClaims.organizations[0].title
}
if (payload.email) {
updates.email = encrypt(payload.email)
updates.email = payload.email // 不加密,让 updateAccount 处理
}
if (payload.email_verified !== undefined) {
updates.emailVerified = payload.email_verified
@@ -380,14 +380,14 @@ async function refreshAccountToken(accountId) {
// 如果返回了新的 refresh token更新它
if (newTokens.refresh_token && newTokens.refresh_token !== refreshToken) {
updates.refreshToken = encrypt(newTokens.refresh_token)
updates.refreshToken = newTokens.refresh_token // 不加密,让 updateAccount 处理
logger.info(`Updated refresh token for account ${accountId}`)
}
// 更新账户信息
await updateAccount(accountId, updates)
logRefreshSuccess(accountId, accountName, 'openai', newTokens.expiry_date)
logRefreshSuccess(accountId, accountName, 'openai', newTokens) // 传入完整的 newTokens 对象
return newTokens
} catch (error) {
logRefreshError(accountId, account?.name || accountName, 'openai', error.message)

View File

@@ -431,7 +431,7 @@
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div class="whitespace-nowrap text-gray-300">model_provider = "crs"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5-codex"</div>
<div class="whitespace-nowrap text-gray-300">model_reasoning_effort = "high"</div>
<div class="whitespace-nowrap text-gray-300">disable_response_storage = true</div>
<div class="whitespace-nowrap text-gray-300">preferred_auth_method = "apikey"</div>
@@ -918,7 +918,7 @@
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div class="whitespace-nowrap text-gray-300">model_provider = "crs"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5-codex"</div>
<div class="whitespace-nowrap text-gray-300">model_reasoning_effort = "high"</div>
<div class="whitespace-nowrap text-gray-300">disable_response_storage = true</div>
<div class="whitespace-nowrap text-gray-300">preferred_auth_method = "apikey"</div>
@@ -1396,7 +1396,7 @@
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div class="whitespace-nowrap text-gray-300">model_provider = "crs"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5"</div>
<div class="whitespace-nowrap text-gray-300">model = "gpt-5-codex"</div>
<div class="whitespace-nowrap text-gray-300">model_reasoning_effort = "high"</div>
<div class="whitespace-nowrap text-gray-300">disable_response_storage = true</div>
<div class="whitespace-nowrap text-gray-300">preferred_auth_method = "apikey"</div>