Skip to content

feat(models): enrich /api/models with runtime context length and LiteLLM model_info metadata - #107

Merged
spelech merged 2 commits into
mainfrom
feat/model-context-metadata-and-limits
Nov 3, 2026
Merged

spelech merged 2 commits into
mainfrom
feat/model-context-metadata-and-limits

Conversation

@spelech

@spelech spelech commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exposes top-level context_length, max_input_tokens, max_output_tokens, and max_tokens on /api/models.
  • Injects runtime context window matching running instance (via /api/ps) or configured \DefaultOllamaContextLength\ (default: 24,576 / 24k).
  • Injects nested model_info metadata matching LiteLLM Model Manager specifications (\max_input_tokens, \max_output_tokens, \context_length, \key, \mode).
  • Adds a configurable Default Context Window setting in the UI under Settings -> Memory & Cache Lifetimes.
  • Adds test verification in \ServerEndpointsTests.cs.

@spelech
spelech merged commit 548a550 into main Nov 3, 2026
3 checks 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