test(catalog): align synced-row body contract with #20415 (no placeholder context_length)

This commit is contained in:
diegosouzapw
2026-11-19 18:57:36 -03:00
parent 638cc4de86
commit 8c91d2f836

View File

@@ -60,7 +60,9 @@ async function catalogRow(id: string) {
return rest;
}
function syncedRowBody(provider: string, model: string, contextLength = 128000) {
// #20415: a passthrough provider's synced row no longer advertises the registry placeholder
// (128000) as context_length, so the default is "omitted"; a real card window still shows.
function syncedRowBody(provider: string, model: string, contextLength?: number) {
return {
id: `${provider}/${model}`,
object: "model",
@@ -71,7 +73,7 @@ function syncedRowBody(provider: string, model: string, contextLength = 128000)
capabilities: { tool_calling: true, reasoning: true },
// The tip publishes a readable name for a synced row that has none (#18354).
name: resolveModelDisplayName(model),
context_length: contextLength,
...(contextLength === undefined ? {} : { context_length: contextLength }),
};
}