Skip to content

[ENHANCEMENT] Move LLM Providers and model names to external JSON file #715

@stephanj

Description

@stephanj

Analysis and Implementation Strategy

Current State Analysis

Project Structure:

  • Main plugin module with dependencies on a separate core module
  • LLMModelRegistryService contains hardcoded model definitions for multiple providers
  • Service is used across the codebase via LLMModelRegistryService.getInstance().getModels()
  • Models are defined with detailed properties (costs, token limits, display names, etc.)

Current Hardcoded Providers:

  • OpenAI (GPT models)
  • Anthropic (Claude models)
  • Google (Gemini models)
  • Mistral, Groq, DeepInfra, DeepSeek, Grok
  • Bedrock (AWS with multiple sub-providers)
  • Plus dynamic OpenRouter models

Proposed Implementation Strategy

Key Implementation Recommendations

Based on my analysis, here are the specific next steps I recommend:

1. Start with GitHub Repository Setup

Create a dedicated repository for model configurations with proper versioning and schema validation. This ensures data integrity and enables community contributions.

https://github.com/devoxx/devoxx-genie-model-registry

2. Implement Gradual Migration

Rather than replacing all hardcoded models immediately, implement a hybrid approach where:

  • External JSON provides the latest model data
  • Existing hardcoded models serve as reliable fallback
  • Users can gradually transition with confidence

3. Focus on Caching and Reliability

The plugin should work offline and handle network failures gracefully. A multi-layer caching strategy ensures performance and reliability.

4. Maintain Backward Compatibility

Keep the existing getModels() API unchanged so current code continues working without modifications.

Would you like me to start implementing any specific part of this strategy? I can begin with:

  1. Creating the JSON schema and sample data files
  2. Implementing the HTTP client and caching service
  3. Refactoring the LLMModelRegistryService to support external loading
  4. Setting up the GitHub repository structure

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions