fix(chat): run preflight against the resolved LLM, not the default#642
Draft
Ahmath-Gadji wants to merge 1 commit into
Draft
fix(chat): run preflight against the resolved LLM, not the default#642Ahmath-Gadji wants to merge 1 commit into
Ahmath-Gadji wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…endpoint max_llm_context_size and max_output_tokens are now editable per LLM endpoint from the admin UI (stored in the endpoint's extra), instead of only via the MAX_LLM_CONTEXT_SIZE / MAX_OUTPUT_TOKENS env vars. The chat token preflight reads the default LLM endpoint's values and falls back to the global llm_context config. Groundwork for #639 (per-endpoint token sizing); the resolved-LLM preflight follows.
a464ccd to
53da5c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — scaffolding only. To be implemented later.
Problem
The chat preflight validates only the default LLM (
config.llm), so it is out of step with the LLM that actually answers once partitionchat_llmpresets are honored:check_llm_model_availability(openrag/api/dependencies/llm.py) probes onlyconfig.llm. A partition with a healthy customchat_llmis rejected (503/404) when the default endpoint is down.get_max_model_tokens/validate_tokens_limit(openrag/api/routers/user/chat.py) use a single startup-primed global from the default model, so requests are sized against the wrong context window.Plan
chat_llm, mirroringQueryService._resolve_llm) before the availability/token preflight.config.llm_context.chat_llmsucceeds; per-endpoint context sizing.Notes
Pre-existing limitation of the preflight layer, surfaced once answer generation routes through non-default endpoints. Separately, per-endpoint
max_llm_context_size/max_output_tokensare being made admin-configurable, which covers the default endpoint's sizing; this PR extends the preflight to the resolved endpoint.Closes #639.