Skip to content

feat(sync): add kilo provider#2997

Merged
rekram1-node merged 4 commits into
anomalyco:devfrom
levdad:add-kilo-sync
Jul 10, 2026
Merged

feat(sync): add kilo provider#2997
rekram1-node merged 4 commits into
anomalyco:devfrom
levdad:add-kilo-sync

Conversation

@levdad

@levdad levdad commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Implements sync support for Kilo Gateway in packages/core/src/sync/providers/kilo.ts.

  • Fetches models from https://api.kilo.ai/api/gateway/models
  • Supports optional KILO_API_KEY authentication
  • Handles deprecated/unavailable models gracefully
  • Derives reasoning_options from opencode.variants
  • Preserves existing hand-authored fields (status, interleaved, knowledge, limit.input, cost.tiers)

levdad added 3 commits July 2, 2026 17:31
Implement the Kilo Gateway sync provider to fetch and synchronize model
metadata.

- Add `kilo` provider implementation
- Add `kilo:sync` script to `package.json`
- Update CI workflow to include `KILO_API_KEY`
- Add `kilo` to the `aggregators` group
- Update `sync.md` documentation
@levdad

levdad commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

this will fix #2036

@rekram1-node

Copy link
Copy Markdown
Collaborator

is the key needed or is it optional?

@levdad

levdad commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

is the key needed or is it optional?

The key is needed to use the kilo provider, but it is not needed to get the list of available models.

@rekram1-node rekram1-node merged commit 56223fd into anomalyco:dev Jul 10, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] packages/core/src/sync/providers/kilo.ts (diff lines 91-92, 100-102, 386-517) - Check: Provider modules must not contain TOML scanning or generic comparison logic. Why: kilo.ts duplicates ~130 lines of helpers from openrouter.ts (modelMetadataExists, baseModelOmit, baseModelOverrides, inheritedOverride, stripUndefined, sameInheritedValue, stableInheritedValue, isPlainObject, modelMetadata, canonicalCandidates) plus the module-level MODELS_DIR, modelMetadataByID, modelMetadataFilesByProvider, and the readFileSync/readdirSync/path imports. None of these are reachable from kilo.translateModel/buildKiloModel — the module already imports factorBaseModel and resolveCanonicalBaseModel from openrouter.ts, which use OpenRouter's own internal copies of these helpers. This dead block both violates sync.md's "Do not put TOML scanning, writing, deletion, reporting, or generic comparison logic in provider modules" and ships unreachable filesystem/TOML-reading code that can mislead future maintainers. Action: Delete the unused helper cluster (modelMetadataExists through canonicalCandidates), the module-level MODELS_DIR/modelMetadataByID/modelMetadataFilesByProvider maps, and the now-unused readFileSync/readdirSync/path imports; rely on the imported factorBaseModel/resolveCanonicalBaseModel for base-model factoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants