mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(ai): normalize Kimi K2.7 to the canonical coding model
Some checks are pending
CI / build-check-test (push) Waiting to run
Some checks are pending
CI / build-check-test (push) Waiting to run
Treat the models.dev k2p7 entry as an alias for kimi-for-coding and regenerate provider catalogs. This restores consistency between generated model types and values and unblocks repository type checks.
This commit is contained in:
parent
3595e080cb
commit
13437ca828
1 changed files with 2 additions and 2 deletions
|
|
@ -1673,12 +1673,12 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||
const kimiModels = data["kimi-for-coding"].models as Record<string, ModelsDevModel>;
|
||||
const hasCanonicalModel = Object.prototype.hasOwnProperty.call(kimiModels, "kimi-for-coding");
|
||||
|
||||
const kimiAliases = new Set(["k2p5", "k2p6"]);
|
||||
const kimiAliases = new Set(["k2p5", "k2p6", "k2p7"]);
|
||||
|
||||
for (const [modelId, model] of Object.entries(kimiModels)) {
|
||||
const m = model as ModelsDevModel;
|
||||
if (m.tool_call !== true) continue;
|
||||
// models.dev may expose versioned aliases (e.g. k2p5/k2p6).
|
||||
// models.dev may expose versioned aliases (e.g. k2p5/k2p6/k2p7).
|
||||
// Normalize aliases to the canonical model id and drop duplicates when canonical exists.
|
||||
if (kimiAliases.has(modelId) && hasCanonicalModel) continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue