-
Notifications
You must be signed in to change notification settings - Fork 758
feat(codex): add routed tool-discovery compatibility profiles #1607
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 1 commit
c1d655d
b8cb797
2fd318b
524b649
9315ad0
d3be5eb
6963c09
cdfb6da
402fdb2
20109fb
579429d
12fd501
270c11f
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 |
|---|---|---|
|
|
@@ -69,6 +69,7 @@ import { createAdmissionGate, ResourceAdmissionError, type AdmissionMetrics } fr | |
|
|
||
| import { CODEX_CUSTOM_MODEL_CATALOG_KIND, JAWCODE_CATALOG_AUGMENT_PROVIDERS, catalogModelSlug, shouldExposeRoutedModel } from "./parsing"; | ||
| import type { CatalogModel } from "./parsing"; | ||
| import { resolveConfiguredRoutedToolDiscoveryMode } from "./tool-discovery"; | ||
| import { disabledNativeSlugs, hasComboTargets, nativeDefaultReasoningEffort, nativeInputModalities, nativeOpenAiContextWindow, nativeOpenAiSlugs, nativeParallelToolCalls, nativeReasoningEfforts } from "./metadata"; | ||
| import { deriveComboCatalogModel, normalizedOpenAiApiSignature, openAiApiCollisionWarnings, replaceLastComboCatalogOmissions, warnUncataloguedComboOnce } from "./aggregation"; | ||
| import type { ComboCatalogOmission } from "./aggregation"; | ||
|
|
@@ -554,6 +555,8 @@ function providerCatalogFingerprint(name: string, prov: OcxProviderConfig): Reco | |
| rsDel: prov.modelReasoningSummaryDelivery ?? null, | ||
| noVis: [...(prov.noVisionModels ?? [])].sort(), | ||
| ptc: prov.parallelToolCalls ?? null, | ||
| rtd: prov.routedToolDiscovery ?? null, | ||
| mrtd: prov.modelRoutedToolDiscovery ?? null, | ||
| gMode: prov.googleMode ?? null, | ||
| }; | ||
| } | ||
|
|
@@ -608,7 +611,6 @@ function configuredReasoningSummarySupport(prov: OcxProviderConfig | undefined, | |
| } | ||
|
|
||
| export function applyProviderConfigHints(name: string, prov: OcxProviderConfig, model: CatalogModel, providerCap?: number): CatalogModel { | ||
| void name; | ||
| const configuredCap = configuredContextWindow(prov, model.id); | ||
| const configuredMaxInput = configuredMaxInputTokens(prov, model.id); | ||
| let inputModalities = configuredInputModalities(prov, model.id); | ||
|
|
@@ -649,6 +651,9 @@ export function applyProviderConfigHints(name: string, prov: OcxProviderConfig, | |
| ...(prov.parallelToolCalls === true || (prov.adapter === "openai-chat" && prov.parallelToolCalls !== false) | ||
| ? { parallelToolCalls: true } | ||
| : {}), | ||
| // Resolve routed discovery here so configured, live-discovered, cached and combo-derived | ||
| // rows all carry the same value and `auto` never reaches serialization. | ||
| toolDiscoveryMode: resolveConfiguredRoutedToolDiscoveryMode(name, prov, model.id).mode, | ||
|
Comment on lines
+654
to
+656
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.
When the configured model is represented by AGENTS.md reference: src/AGENTS.md:L18-L18 Useful? React with 👍 / 👎. |
||
| }; | ||
| const capped = applyProviderContextCap(hinted.contextWindow, providerCap); | ||
| if (providerCap !== undefined && capped !== hinted.contextWindow) { | ||
|
|
||
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.
For a provider configured under a custom name with
adapter: "cursor", the resolver correctly hard-fences discovery to direct, butderiveEntry()passes onlymodel.providerhere, soisCursorRoute()classifies it as non-Cursor. The resulting row incorrectly retainsweb_search_tool_typeeven though this transport bypasses the sidecar, and it also loses Cursor's automatic parallel-tool-call advertisement. Carry the adapter-derived Cursor identity throughCatalogModelor pass an explicit Cursor flag to normalization.Useful? React with 👍 / 👎.