Skip to content

feat: expand codex config surface and custom model aliases#18

Merged
iam-brain merged 8 commits intomainfrom
feat/custom-model-config-surface
Mar 8, 2026
Merged

feat: expand codex config surface and custom model aliases#18
iam-brain merged 8 commits intomainfrom
feat/custom-model-config-surface

Conversation

@iam-brain
Copy link
Owner

Summary

  • expand the public codex config surface to match codex-style model options
  • add selectable customModels aliases that inherit live catalog/runtime metadata from a target model
  • tighten reasoning summary validation/errors and restore JSONC as the canonical commented config format

Testing

  • npm run typecheck
  • npm run build
  • npm test -- test/codex-native-spoof-mode.test.ts test/config-file-loading.test.ts test/config-loading-resolve.test.ts test/config-schema.test.ts test/model-catalog.provider-models.test.ts test/codex-native-config-variants.test.ts test/request-transform-model-service-tier.test.ts
  • npm test -- test/mode-smoke.test.ts

@iam-brain
Copy link
Owner Author

@codex

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +938 to +943
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]

Choose a reason for hiding this comment

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

P2 Badge 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,

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@iam-brain iam-brain merged commit 11198fa into main Mar 8, 2026
6 checks passed
@iam-brain iam-brain deleted the feat/custom-model-config-surface branch March 8, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant