feat: expand codex config surface and custom model aliases#18
feat: expand codex config surface and custom model aliases#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08912130ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
lib/config/file.ts
Outdated
| const quarantinedPath = quarantineLegacyConfigSync(legacyPath) | ||
| const suffix = quarantinedPath ? ` Quarantined legacy file to ${quarantinedPath}.` : "" | ||
| console.warn( | ||
| `[opencode-codex-auth] Found both ${CONFIG_FILE} and ${LEGACY_CONFIG_FILE}. Using ${CONFIG_FILE}.${suffix}` | ||
| ) | ||
| return [filePath] |
There was a problem hiding this comment.
Preserve legacy config until canonical file validates
When both codex-config.jsonc and legacy codex-config.json exist, this path quarantines the legacy file and immediately returns only the canonical file candidate. If the canonical file is malformed or fails validation, loadConfigFile now ignores all config and the previously valid legacy settings are no longer available, which can silently reset behavior to defaults after upgrade. Defer quarantine until canonical parsing/validation succeeds (or fall back to legacy on failure) to avoid this regression.
Useful? React with 👍 / 👎.
| explicitValue: reasoningSummary, | ||
| explicitSource: "request.reasoning.summary", | ||
| hasReasoning: reasoningEffort !== undefined && reasoningEffort !== "none", | ||
| configuredValue: modelReasoningSummaryOverride ?? globalReasoningSummary, |
There was a problem hiding this comment.
Honor custom-model summary overrides during payload validation
This validation only uses behaviorSettings (perModel/global) for configuredValue, so custom alias overrides from customModels are not represented here. For a selected custom model with reasoningSummary: "none", an invalid catalog default can still trigger invalid_reasoning_summary because the custom override is ignored in this check, even though chat-params resolved the alias intentionally. Include selected custom-model config when computing configuredValue so custom aliases can actually suppress these errors.
Useful? React with 👍 / 👎.
Summary
customModelsaliases that inherit live catalog/runtime metadata from a target modelTesting