fix(core-schemas): add missing openai-codex provider type definition #5359
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
PR #5270 added openai-codex provider but the implementation was incomplete - it included runtime validation and UI metadata, but missed the TypeScript type definition in
@kilocode/core-schemasand model mapping incli/src/config/mapper.ts.This bug was discovered while developing the CLI providers API command (branch
feat/cli-subcommands-discoverability), which needs to enumerate and display all configured providers with their model information. When attempting to addcase "openai-codex":to the switch statement, TypeScript reported:Implementation
packages/core-schemas/src/config/provider.ts:
openAICodexProviderSchemawithapiModelIdfieldproviderConfigSchemadiscriminated union (line 398)OpenAICodexProviderConfigtype (line 444)kilocode_change(per CLAUDE.md - packages/ requires markers)cli/src/config/mapper.ts:
openai-codexcase alongsideopenai-native(both useapiModelId)openai-codex now matches the pattern of openai-native and can be properly handled in type-safe code.
Screenshots
N/A (type definition fix)
How to Test
pnpm check-types # All 20 packages should passGet in Touch
@PeterDaveHello