fix: correct friendly model table typing

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-08-31 16:30:15 +00:00
co-authored by Simon Shi
parent aaac381d76
commit 9dc71be404
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ describe("Qoder model cache", () => {
const cache = JSON.parse(readFileSync(CACHE_PATHS[region], "utf8"));
expect(cache.models.map((model: { id: string }) => model.id)).toEqual(expectedIds);
for (const entry of interaction.response.body.chat as Array<{ key: string; display_name: string }>) {
const catalog = interaction.response.body as { chat: Array<{ key: string; display_name: string }> };
for (const entry of catalog.chat) {
const friendlyId = entry.display_name.replace(/\s+/g, "");
expect(cache.configs[entry.key]?.key).toBe(entry.key);
expect(cache.configs[friendlyId]?.key).toBe(entry.key);