Commit Graph
1 Commits
Author SHA1 Message Date
toxblh 504954dcee feat: fallback provider chain for auxiliary compression model
OSV-Scanner / Scan lockfiles (push) Has been cancelled
When the primary auxiliary compression model fails the minimum
context-length check (64K floor), iterate through the user's
fallback_providers chain instead of raising ValueError and
killing the session.

- check_compression_model_feasibility: catch ValueError from
  MINIMUM_CONTEXT_LENGTH rejection, try each fallback provider
  in order, store the first suitable one as
  _compression_fallback on the ContextCompressor
- ContextCompressor._generate_summary: when _compression_fallback
  is set, override main_runtime (provider/model/base_url/api_key)
  so summaries route to the fallback provider
- When all fallbacks are exhausted, emit a clear warning and
  continue without summaries (same as 'no auxiliary LLM' path)

Fixes the session-killing crash when switching to a model whose
provider's auto-detected compression model has <64K context.
2026-05-29 14:52:31 +00:00