Skip to content

refactor(sync): prioritize apiDescription over existing model description - #4961

Open
levdad wants to merge 2 commits into
anomalyco:devfrom
levdad:kilo-description
Open

refactor(sync): prioritize apiDescription over existing model description#4961
levdad wants to merge 2 commits into
anomalyco:devfrom
levdad:kilo-description

Conversation

@levdad

@levdad levdad commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Update the model building logic to prefer the description provided by the API over the locally cached description. This ensures that updates to model descriptions from the provider are reflected in the local catalog during synchronization.

Providers frequently enrich their model descriptions with important context such as training details, intended use cases, and capability notes. By preferring the upstream API description, we keep the local catalog in sync with the most accurate and complete information available from the provider.

…tion

Update the model building logic to prefer the description provided by the
API over the locally cached description. This ensures that updates to
model descriptions from the provider are reflected in the local catalog
during synchronization.
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] packages/core/src/sync/providers/kilo.ts:220 - Check: Description priority must match the stated sync behavior on every path. Why: The PR only flips the factored base_model branch to apiDescription ?? existing?.description ?? …. The standalone return still uses existing?.description ?? apiDescription ?? …, so models without a canonical base keep stale local descriptions and the two paths disagree. Action: Apply the same apiDescription-first order (and any empty-string guard) on the standalone description assignment.
  • [medium] [possible mistake] packages/core/src/sync/providers/kilo.ts:190 - Check: Treat blank API descriptions as non-authoritative. Why: apiDescription is model.description?.replaceAll(…).trim(). After this change, a whitespace-only or empty API string is not nullish, so ?? keeps "" and overwrites a previously authored description instead of falling through to existing or describeModel. Action: Prefer the API text only when it is non-empty (e.g. apiDescription || existing?.description || describeModel(…) or an equivalent guard) on both branches.
  • [low] [violation] packages/core/src/sync/providers/kilo.ts:190 - Check: Behavioral sync changes need regression coverage. Why: Description source priority is now a real write-path behavior change for Kilo, but there is no buildKiloModel / sync test asserting API vs existing vs generated description, including empty API text and standalone vs factored models. Action: Add focused tests for the new priority (non-empty API wins; empty/missing API keeps existing or describeModel; both code paths).

- Use apiDescription-first order in both base-model and standalone paths.
- Treat empty/whitespace API descriptions as non-authoritative so they fall
  back to existing authored or generated descriptions.
- Add regression tests for description priority covering both code paths.
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant