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);
+2 -2
View File
@@ -83,7 +83,6 @@ export const staticModels: QoderModelDef[] = [
{
id: "Auto",
upstreamKey: "auto",
upstreamKey: "auto",
name: "Auto",
api: "qoder-api",
provider: "qoder",
@@ -196,7 +195,6 @@ export const staticModels: QoderModelDef[] = [
{
id: "Qwen3.7-Max",
upstreamKey: "qmodel_latest",
upstreamKey: "qmodel_latest",
name: "Qwen3.7-Max",
api: "qoder-api",
provider: "qoder",
@@ -298,6 +296,7 @@ export const staticModels: QoderModelDef[] = [
export const staticCnModels: QoderModelDef[] = [
{
id: "Auto",
upstreamKey: "auto",
name: "Auto",
api: "qoder-api",
provider: "qoder-cn",
@@ -314,6 +313,7 @@ export const staticCnModels: QoderModelDef[] = [
},
{
id: "Qwen3.7-Max",
upstreamKey: "qmodel_latest",
name: "Qwen3.7-Max",
api: "qoder-api",
provider: "qoder-cn",