-
Notifications
You must be signed in to change notification settings - Fork 0
[WRONG BRANCH] fix(devin): preserve account-specific effort ladders #527
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -876,6 +876,37 @@ export function applyProviderConfigHints( | |
| }; | ||
| } | ||
|
|
||
| /** Build a Devin row without letting its degraded provider fallback replace live account evidence. */ | ||
| export function buildDevinLiveCatalogEntry( | ||
| name: string, | ||
| prov: OcxProviderConfig, | ||
| id: string, | ||
| liveWindow: number | undefined, | ||
| liveEfforts: string[] | undefined, | ||
| providerCap?: number, | ||
| metadataModelIdCaseFold?: boolean, | ||
| effectiveAlias?: string | null, | ||
| ): CatalogModel { | ||
| const hinted = catalogHintsFromProviderConfig( | ||
| name, | ||
| prov, | ||
| id, | ||
| providerCap, | ||
| metadataModelIdCaseFold, | ||
| effectiveAlias, | ||
| ); | ||
| const modelEfforts = modelRecordValue(prov.modelReasoningEfforts, id); | ||
| return { | ||
| id, | ||
| provider: name, | ||
| ...(liveWindow ? { contextWindow: liveWindow } : {}), | ||
| ...hinted, | ||
| // A per-model setting is an operator override. The provider-wide value is | ||
| // only a degraded-mode fallback, so live account evidence supersedes it. | ||
| ...(liveEfforts?.length && modelEfforts === undefined ? { reasoningEfforts: liveEfforts } : {}), | ||
|
Comment on lines
+898
to
+906
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.
Checking only AGENTS.md reference: src/AGENTS.md:L10-L10 Useful? React with 👍 / 👎. |
||
| }; | ||
| } | ||
|
|
||
| export function catalogHintsFromProviderConfig( | ||
| name: string, | ||
| prov: OcxProviderConfig, | ||
|
|
@@ -1735,18 +1766,16 @@ async function fetchProviderModelsWithAuth( | |
| // chose. | ||
| const result = liveResult.models.map((id) => { | ||
| const liveWindow = liveResult.contextWindows[id]; | ||
| return { | ||
| return buildDevinLiveCatalogEntry( | ||
| name, | ||
| prov, | ||
| id, | ||
| provider: name, | ||
| ...(liveWindow ? { contextWindow: liveWindow } : {}), | ||
| // The account catalog names the effort variants each base model has, so | ||
| // its ladder is measured rather than assumed. Without this the entry | ||
| // inherits the generic routed ladder and offers rungs the model rounds | ||
| // away, and every client that keys an effort control off this field — | ||
| // the Pi-shaped exports — renders no control at all. | ||
| ...(liveResult.efforts[id]?.length ? { reasoningEfforts: liveResult.efforts[id] } : {}), | ||
| ...catalogHintsFromProviderConfig(name, prov, id, contextCap, metadataModelIdCaseFold, captured.effectiveAlias), | ||
| } as CatalogModel; | ||
| liveWindow, | ||
| liveResult.efforts[id], | ||
|
Comment on lines
+1769
to
+1774
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 a later catalog gather hits Useful? React with 👍 / 👎. |
||
| contextCap, | ||
| metadataModelIdCaseFold, | ||
| captured.effectiveAlias, | ||
| ); | ||
| }); | ||
| const forCache = withConfiguredRetention(result, { retainComboTargets: false }); | ||
| if (!setCached(name, forCache, Date.now(), cacheGeneration)) { | ||
|
|
||
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.
When a successful account catalog exposes zero or only one reasoning variant for a base model,
fetchDevinUsableModelsintentionally omits that model fromeffortsbecause there is no useful control. Here, an undefined/emptyliveEffortsskips the final spread and leaveshinted.reasoningEffortsset to the provider-wide fallback, so the live result advertises choices the account did not expose. Successful discovery should explicitly suppress the fallback for this case.Useful? React with 👍 / 👎.