Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Derive LiteLLM reasoning capabilities from local metadata - #2240

Open
Selene29 wants to merge 1 commit into
repowise-dev:mainfrom
Selene29:fix/litellm-model-capabilities
Open

Derive LiteLLM reasoning capabilities from local metadata#2240
Selene29 wants to merge 1 commit into
repowise-dev:mainfrom
Selene29:fix/litellm-model-capabilities

Conversation

@Selene29

Copy link
Copy Markdown
Contributor

Summary

  • Build LiteLLM model options from the loaded local model metadata.
  • Advertise exact reasoning efforts from explicit levels and capability flags.
  • Use the same metadata interpretation for discovery and runtime validation.

Problem

LiteLLM discovery offered a fixed low, medium, and high set for reasoning models, while execution used a separate capability lookup. The two paths could disagree about which effort values a model accepts.

Catalog construction also consulted per-model helpers and included non-text model categories. This change keeps enumeration local, filters those categories, and treats explicit negative or always-on metadata as authoritative.

Testing

  • 6 LiteLLM provider tests passed
  • Ruff lint and format checks passed
  • Whitespace checks passed

Catalog construction called reasoning helpers for every model and offered
a fixed low/medium/high set. Read the loaded model_cost metadata when
building model options, derive effort choices from explicit levels and
capability flags, and filter known non-text model categories.

Honor explicit negative capability metadata and thinking-always-on
constraints. Prefer local metadata for runtime validation, retaining the
existing capability lookup fallback when metadata is absent.

Validation:
- 6 LiteLLM provider tests passed with SDK calls mocked.
- Ruff lint/format checks and git diff --check passed.
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