mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(ai): add Qwen Token Plan Individual provider (#7659)
This commit is contained in:
parent
9ab91fb93e
commit
c03d78bdce
26 changed files with 403 additions and 22 deletions
|
|
@ -39,6 +39,13 @@ function describeSetDifference(expected: readonly string[], actual: readonly str
|
|||
.join("; ");
|
||||
}
|
||||
|
||||
export function assertExactModelIds(label: string, expected: Iterable<string>, actual: Iterable<string>): void {
|
||||
const expectedIds = Array.from(new Set(expected)).sort();
|
||||
const actualIds = Array.from(new Set(actual)).sort();
|
||||
if (sameStrings(expectedIds, actualIds)) return;
|
||||
throw new Error(`${label} model IDs do not match (${describeSetDifference(expectedIds, actualIds)})`);
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue