Skip to content

Fix #542: Correct Codex model configuration from gpt-5.2-codex to gpt-5.2#543

Closed
ding113 wants to merge 1 commit into
devfrom
fix/issue-542-codex-model-name
Closed

Fix #542: Correct Codex model configuration from gpt-5.2-codex to gpt-5.2#543
ding113 wants to merge 1 commit into
devfrom
fix/issue-542-codex-model-name

Conversation

@ding113

@ding113 ding113 commented Jan 5, 2026

Copy link
Copy Markdown
Owner

Summary

Fixed incorrect Codex model name in usage documentation from gpt-5.2-codex to gpt-5.2.

Problem

Fixes #542

The usage documentation showed an incorrect model configuration for Codex:

model = "gpt-5.2-codex"

This causes a 400 error:

错误: invalid_request_error: Unsupported value: 'high' is not supported with the 'gpt-5.2-codex' model. Supported values are: 'medium'.

Related Issues:

Note: Issue #542 comment mentioned that CHANGELOG.md (line 359) already documents the correct model name as gpt-5.2, confirming this documentation fix aligns with the intended configuration.

Solution

Changed the model name to the correct value:

model = "gpt-5.2"

Changes

Core Changes

  • Updated src/app/[locale]/usage-doc/page.tsx to use gpt-5.2 instead of gpt-5.2-codex in both the auth.json and env-var configuration examples (2 occurrences)

Testing

  • Verified all instances of gpt-5.2-codex have been removed from usage documentation
  • Code changes are minimal and focused on documentation
  • No functional code changes

Checklist

  • Code follows project conventions
  • Self-review completed
  • Documentation accuracy verified

Description enhanced by Claude AI

Changed the model name in usage-doc configuration examples from "gpt-5.2-codex"
to "gpt-5.2" as the "-codex" suffix causes API errors. The API only supports
"gpt-5.2" as the model name.

Fixes #542

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ding113, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical documentation error that was causing configuration failures for users of the Codex model. By updating the model name in the usage guide, it ensures that users can correctly set up their configurations without encountering HTTP 400 errors, thereby improving the overall user experience and reliability of the documentation.

Highlights

  • Model Configuration Correction: The pull request corrects an erroneous model name, "gpt-5.2-codex", in the usage documentation to the correct "gpt-5.2".
  • Error Resolution: This change resolves a 400 error encountered by users attempting to configure the Codex model with the previously incorrect name.
  • Documentation Update: The usage documentation file "src/app/[locale]/usage-doc/page.tsx" has been updated to reflect the accurate model name in both auth.json and environment variable configuration examples.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Jan 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

此PR修正了用户文档中的模型配置示例,将两处Codex配置块中的模型引用从"gpt-5.2-codex"更新为"gpt-5.2",以符合API实际支持的模型标识。

Changes

群组 / 文件 变更摘要
文档配置修正
src/app/[locale]/usage-doc/page.tsx
修正两个TOML代码示例中的模型配置,将model值从"gpt-5.2-codex"更正为"gpt-5.2",解决API不支持该模型名称的问题

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题清晰准确地总结了主要变更:将模型配置从 gpt-5.2-codex 更正为 gpt-5.2,并正确引用了关联的议题 #542
Linked Issues check ✅ Passed 拉取请求成功解决了议题 #542 的主要需求:将 gpt-5.2-codex 更正为 gpt-5.2,修复导致 API 400 错误的模型配置。
Out of Scope Changes check ✅ Passed 所有变更都在议题 #542 的范围内,仅修改了使用文档中的模型配置,没有引入无关的改动。
Description check ✅ Passed PR描述清晰详细,准确说明了问题、解决方案和变更范围,与代码变更内容完全对应。
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/issue-542-codex-model-name

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue where an incorrect model name was used in the usage documentation. The change correctly replaces gpt-5.2-codex with gpt-5.2 in the configuration examples for the Codex CLI within src/app/[locale]/usage-doc/page.tsx. This correction aligns with the problem description and improves the accuracy of the documentation. The changes are focused and I see no further issues. This looks good to merge.

@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

🧪 测试结果

测试类型 状态
代码质量
单元测试
集成测试
API 测试

总体结果: ✅ 所有测试通过

@github-actions github-actions Bot added the size/XS Extra Small PR (< 50 lines) label Jan 5, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review Summary

No significant issues identified in this PR.

PR Size: XS

  • Lines changed: 4
  • Files changed: 1

Review Coverage

  • Logic and correctness - Clean
  • Security (OWASP Top 10) - Clean
  • Error handling - Clean
  • Type safety - Clean
  • Documentation accuracy - Clean
  • Test coverage - Adequate
  • Code clarity - Good

Automated review by Codex AI

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Reviewed PR #543 (1 file; 2 additions / 2 deletions → 4 lines changed) and applied the size/XS label.
  • Diff scope: src/app/[locale]/usage-doc/page.tsx:642 and src/app/[locale]/usage-doc/page.tsx:688 (doc example model changed to gpt-5.2).
  • Submitted a PR review summary via gh pr review with no issues found (no inline comments posted).

@ding113 ding113 closed this Jan 5, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Claude Code Hub Roadmap Jan 5, 2026
@ding113
ding113 deleted the fix/issue-542-codex-model-name branch January 27, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs bug Something isn't working size/XS Extra Small PR (< 50 lines)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant