Repository navigation
fix(codex): restore reasoning options for catalog-only models #27910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,17 +30,24 @@ export const chatGptModels = Effect.fn("chatGptModels")(function* ( | |
| ); | ||
| if (response.status !== 200) return yield* new ChatGptCatalogError({ status: response.status }); | ||
| const catalog = yield* response.json.pipe(Effect.flatMap(Schema.decodeUnknownEffect(Catalog))); | ||
| const fallbackCapabilities = | ||
| nativeModels.find((model) => model.capabilities)?.capabilities ?? null; | ||
| return catalog.models | ||
| .filter((model) => model.visibility === "list") | ||
| .map( | ||
| (model) => | ||
| ({ | ||
| ...nativeModels.find((native) => native.slug === model.slug), | ||
| capabilities: | ||
| nativeModels.find((native) => native.slug === model.slug)?.capabilities ?? null, | ||
| slug: model.slug, | ||
| name: model.display_name, | ||
| isCustom: false, | ||
| }) satisfies ServerProviderModel, | ||
| ); | ||
| .map((model) => { | ||
| const native = nativeModels.find((native) => native.slug === model.slug); | ||
| const variant = model.slug.split("-").at(-1); | ||
| const capabilities = native | ||
| ? native.capabilities | ||
| : (nativeModels.find( | ||
| (candidate) => candidate.slug.endsWith(`-${variant}`) && candidate.capabilities, | ||
| )?.capabilities ?? fallbackCapabilities); | ||
|
Comment on lines
+42
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return { | ||
| ...native, | ||
| capabilities, | ||
| slug: model.slug, | ||
| name: model.display_name, | ||
| isCustom: false, | ||
| } satisfies ServerProviderModel; | ||
| }); | ||
| }, Effect.timeout("15 seconds")); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: pingdotgg/t3code
Length of output: 3842
Script executed:
Repository: pingdotgg/t3code
Length of output: 12099
Script executed:
Repository: pingdotgg/t3code
Length of output: 5884
Script executed:
sed -n '80,145p' packages/provider-core/src/server/snapshotProbe.tsRepository: pingdotgg/t3code
Length of output: 2461
Script executed:
Repository: pingdotgg/t3code
Length of output: 1942
Script executed:
sed -n '370,420p' packages/shared/src/model.tsRepository: pingdotgg/t3code
Length of output: 1905
Exclude custom models from native capability searches.
draft.modelscan include configured custom models beforechatGptModelsruns. If native discovery omits a catalog slug that matches a custom model, the exact-match search can use that custom entry's capabilities. The suffix and fallback searches can also select explicit capabilities from a custom entry. Filter out entries withisCustom === truewhen selecting native capabilities.Suggested fix