Skip to content

Conversation

@agustif
Copy link
Owner

@agustif agustif commented Dec 18, 2025

Summary

  • Real LM Studio models: Uses actual LM Studio API instead of fake documentation examples
  • Rich metadata: Merges API v0 (type, arch, context) + v1 (created, owned_by) data
  • Accurate capabilities: Vision detection from model.type === "vlm", embeddings handling
  • Graceful fallback: Works with either endpoint, proper error handling

Technical Details

  • Calls /api/v0/models for comprehensive model information
  • Falls back to /v1/models for additional fields
  • Zero guessing - only uses documented LM Studio API response fields
  • Sets correct context limits, architecture family, and modalities

Testing

✅ TypeScript compilation passes
✅ OpenCode starts successfully with LM Studio integration
✅ Graceful handling when LM Studio is offline

thdxr and others added 30 commits December 15, 2025 11:56
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
adamdotdevin and others added 30 commits December 18, 2025 11:16
- Add real-time model discovery from LM Studio /v1/models endpoint
- Load actual models instead of fake documentation examples
- Discover models only when lmstudio provider is configured
- Graceful fallback on connection errors with debug logging
- Use LM Studio API v0 /api/v0/models endpoint for richer metadata
- Extract real model type (llm, vlm, embeddings) from API
- Use actual max_context_length from LM Studio instead of hardcoded values
- Set architecture (family) from model.arch field
- Detect vision capabilities from model.type === 'vlm'
- Handle embeddings models with text-only capabilities
- Fallback to OpenAI-compatible API if v0 unavailable
- Uses API v0 for rich model metadata (type, arch, context, etc)
- Also calls v1 API for additional fields (created, owned_by)
- Merges data from both endpoints for comprehensive model info
- Graceful fallback if either API fails
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.