Files
traefik-llmgateway/tools
lukaszraczylo fb1b2a36ff test(yaegi-check): exercise the builtin table lookup (review SHOULD-6)
The harness previously only ever proved resolveModelMeta's CONFIG-
OVERRIDE layer runs interpreted (testDataWantModel carries an explicit
modelMeta entry). It never exercised an interpreted LOOKUP into the
real, 236-entry builtinModelMetaTable map literal at all.

Adds "gpt-4o" to the harness's openai provider with NO modelMeta
override of its own, so its GET /v1/models context_window can only come
from the builtin-table branch. Its expected value is read directly out
of pricing_data_gen.go at harness run time (readBuiltinContextTokens),
not hardcoded, so this assertion self-updates across a `make
pricing-sync` regeneration instead of pinning a number that could
legitimately drift when upstream LiteLLM data changes.

Also switched both existing GET /v1/models assertions from raw
strings.Contains substring matching to a structured JSON decode keyed by
model id — a bare substring check could not tell which model entry a
given context_window value actually belonged to, which now matters with
two entries in play.
2026-08-22 02:13:50 +01:00
..