Skip to content

feat: add deterministic model glob selection - #20

Merged
AviBackToBlack merged 12 commits into
mainfrom
feat/v0.3-model-glob-selection
Sep 14, 2026
Merged

AviBackToBlack merged 12 commits into
mainfrom
feat/v0.3-model-glob-selection

Conversation

@AviBackToBlack

@AviBackToBlack AviBackToBlack commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implement the first production slice of the v0.3 model-selection contract from #19 without enabling compatibility overrides yet.

This PR:

  • adds optional top-level model_globs configuration while keeping existing exact models semantics unchanged
  • allows glob-only configs without requiring a dummy models = []
  • expands globs with case-sensitive fnmatchcase semantics
  • preserves exact selectors first, then glob declaration order, with lexical ordering inside each glob
  • de-duplicates by first selection and retains exact:<name> / glob:<pattern> provenance
  • keeps the existing select_model_groups() API as a compatibility wrapper
  • routes production build/list/explain through the provenance-aware selector
  • carries selection provenance through prepared/generated groups and exposes it in explain
  • keeps glob-selected groups behind the existing aggregation eligibility/fail-closed boundary
  • preserves fail-fast explain rejection for models outside all configured selectors
  • fails closed if model_overrides is configured before the follow-up override implementation exists

Scope boundary

This PR does not apply any compatibility/evidence overrides and does not change exact/foreign mapping rules. The follow-up slice will implement the strict override whitelist against aggregated group evidence.

Tests

Regressions cover exact-only compatibility, glob-only config, duplicate/empty patterns, strict unmatched globs, case sensitivity, lexical deterministic expansion, first-selector de-duplication/provenance, LiteLLM row-order independence, ineligible glob-selected groups failing aggregation, selection provenance surviving generation/explain, configured list ordering, and fail-fast explain behavior.

Refs #5


Devin Review

Copilot AI lite review requested due to automatic review settings September 14, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/litellm_codex_models/config.py
@AviBackToBlack
AviBackToBlack merged commit e858ada into main Sep 14, 2026
9 checks passed
@AviBackToBlack
AviBackToBlack deleted the feat/v0.3-model-glob-selection branch September 14, 2026 11:03
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