这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@shatfield4
Copy link
Collaborator

@shatfield4 shatfield4 commented Oct 1, 2025

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4469

What is in this change?

  • Utilizes Ollama's /api/show rest endpoint for getting context window directly from Ollama
  • Utilizes LM Studio's /api/v0/models rest endpoint for getting context window directly from LM Studio
  • Has fallbacks for models that cannot be automatically detected (4096)
  • Caching system inside each provider ensuring we do not hit the endpoint multiple times if already cached
  • Move Max Tokens option in frontend to advanced options and allow users to override auto detected limits for both Ollama and LM Studio

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@shatfield4 shatfield4 added the PR:needs review Needs review by core team label Oct 1, 2025
shatfield4 and others added 5 commits October 1, 2025 16:08
@timothycarambat timothycarambat merged commit 0b18ac6 into master Oct 2, 2025
1 check passed
@timothycarambat timothycarambat deleted the lmstudio-ollama-auto-detect-model-context-limits branch October 2, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:needs review Needs review by core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Add auto-detection for Ollama and LM Studio context limits

3 participants