Skip to content

[codex] Align preloaded model aliases#2284

Merged
PawelPeczek-Roboflow merged 3 commits intomainfrom
codex/preload-alias-registry-key
Apr 30, 2026
Merged

[codex] Align preloaded model aliases#2284
PawelPeczek-Roboflow merged 3 commits intomainfrom
codex/preload-alias-registry-key

Conversation

@hansent
Copy link
Copy Markdown
Collaborator

@hansent hansent commented Apr 28, 2026

Summary

  • Preserve the requested model alias when startup preloading resolves a registered alias like florence-2-base to florence-pretrains/3.
  • Pin preloaded aliased models under the same key that request-time loading uses.
  • Add a focused HTTP startup preload test covering the Florence alias behavior.

Root Cause

The request-time LMM path loaded the resolved model ID but passed model_id_alias, causing the model manager and fixed-size cache to key the loaded model by the requested alias. The startup preload path resolved the alias but dropped the original requested ID, so Florence was registered under florence-pretrains/3 while incoming requests looked for florence-2-base.

Validation

  • .venv/bin/python -m py_compile inference/core/interfaces/http/http_api.py tests/inference/unit_tests/core/interfaces/http/test_http_api.py
  • .venv/bin/python -m pytest tests/inference/unit_tests/core/managers/test_decorators.py tests/inference/unit_tests/core/managers/test_base.py -q

Note: the focused test_http_api.py suite is blocked in this local environment before reaching the new test because importing http_api fails with ImportError: cannot import name 'AutoModel' from 'inference_models'.

@PawelPeczek-Roboflow PawelPeczek-Roboflow self-requested a review April 30, 2026 11:13
@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit 5cff9b5 into main Apr 30, 2026
35 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the codex/preload-alias-registry-key branch April 30, 2026 11:18
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.

2 participants