Skip to content

fix(models): benchmark the observed model through its installed inference route - #6990

Closed
tang-vu wants to merge 3 commits into
Osmantic:mainfrom
tang-vu:fix/models-benchmark-active-transport
Closed

tang-vu wants to merge 3 commits into
Osmantic:mainfrom
tang-vu:fix/models-benchmark-active-transport

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

The Models page could show the loaded model while Benchmark discarded its installed route's TLS, API prefix and authentication. It could also treat a saved GGUF_FILE as a live loaded identity after the runtime reported no loaded model or its health endpoint failed, then send a completion request that implicitly loaded that stale model.

Benchmark now uses the existing destination-bound chat route resolver and requires an observed loaded identity before sending inference. Direct runtimes receive that observed identity; the shipped LiteLLM gateway receives ods/current. Missing runtime evidence returns 503 without a completion request or saved performance sample. After the owner loads a model, a fresh request can benchmark it normally.

Validation on 37510d0b4d110c8d14280c98eb31b5c5310af73e, based on current upstream main 49c1e6e376ce1771cbe9572426de1d0a2ca0477d, native Windows and Python 3.14:

  • The new authenticated API regression uses a real local HTTP runtime, a real installed-artifact fixture and the production catalog builder. Null loaded health and unavailable health both failed before the follow-up fix: the endpoint returned 200 after sending an unwanted completion for the persisted filename. Both now refuse before POST, preserve the artifact and recover after live health reports a loaded model.
  • Benchmark transport, request measurement and shared setup route suites: 49 passed. Includes the existing real authenticated HTTP endpoint, TLS/prefix routing, destination-bound credentials, invalid-route refusal, gateway aliases and the new refusal/recovery cases.
  • Related models and performance oracle suites: 209 passed at the final SHA.
  • Python compilation and Git diff checks passed.

The existing PR history is preserved; current main was merged without conflicts. Only routers/models.py and tests/test_benchmark_transport.py are changed against main. #2471 validates malformed model-observation shapes; this change does not duplicate its observer hunks. #6992 repairs registered-store activation idempotence independently.

The shipped Lemonade v10.2.0 server specification documents that chat completions auto-load a model that is not already loaded. The HTTP fixture verifies ODS request behavior; it is not a live Lemonade or GPU performance claim.

No fresh Docker/WSL installation, live Lemonade process, model inference or browser end-to-end validation ran. Concurrent replacement after a valid initial observation remains an existing limitation. Request usage/wall-time measurements retain their explicit label and include gateway and transport overhead.

Overlap check

Searched open and closed upstream PRs for benchmark transport, TLS/prefix authentication, observed model identity and no-loaded-model behavior; inspected changes to routers/models.py. #2471 handles malformed observation shapes and is not duplicated. #6992 covers registered-store reloads, and #7213 covers Hugging Face credentials. This updates the existing canonical #6990 rather than opening a competing PR.

AI Assistance

Codex implemented the original route fix and this observed-model safety follow-up, reproduced the failure and conducted an independent final-head review. Human review remains required before merge.

Release Lane

  • Mainline change targeting main
  • Stable hotfix targeting release/2.6.x

Changed Surface

  • Dashboard API / host agent
  • Model routing / Hermes / capabilities
  • Network exposure / auth / proxy

Risk And Validation

Medium risk. The exact-SHA focused and related receipts above passed; independent reviewer reran 13 transport tests without blocking findings. git diff --check passed. No data migration is introduced.

Operational Change Check

  • This is an operational change and validation is intentionally deferred for live model, GPU, Portal and fresh-install execution. Real local HTTP tests qualify ODS transport/refusal behavior and are not release-grade fleet evidence.

Combined batch validation

These five independently useful PRs were merged without conflicts onto synthetic integration head 0f8d40fa2116a0ea4111d1aff4905f8a9c07a549, based on main 49c1e6e376ce1771cbe9572426de1d0a2ca0477d: #7212, #7213, #6990, #3835, #7214. This records the tested order, not a merge dependency.

Combined native validation: 339 dashboard API/models/performance/workflows/agent tests passed, 3 live n8n-key tests passed, and 8 native PowerShell 5.1 CLI HTTP tests passed. git diff --check and the PowerShell parser passed. The HTTP/SDK fixture and unavailable live Docker/model/Portal limits stated above still apply; integration success does not close those gates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant