Skip to content

feat(llm): Add OpenRouter default configuration support#352

Open
liangzhang-keepmoving wants to merge 3 commits intoNevaMind-AI:mainfrom
liangzhang-keepmoving:feature/openrouter-defaults
Open

feat(llm): Add OpenRouter default configuration support#352
liangzhang-keepmoving wants to merge 3 commits intoNevaMind-AI:mainfrom
liangzhang-keepmoving:feature/openrouter-defaults

Conversation

@liangzhang-keepmoving
Copy link

Description

Adds default configuration support for OpenRouter provider in the memU project, making it easier for users to set up and use OpenRouter through the GUI and configuration files.

Changes Made

  1. Added OpenRouter provider defaults in LLMConfig model (src/memu/app/settings.py)
  2. Updated provider validation to set appropriate defaults for OpenRouter when using default values
  3. Added OpenRouter API endpoint configuration
  4. Set recommended default model to anthropic/claude-3.5-sonnet for optimal performance

Usage Example

from memu.app import MemoryService

# Create service with OpenRouter configuration
service = MemoryService(
    llm_profiles={
        "default": {
            "provider": "openrouter",
            "api_key": "your_openrouter_api_key",
            # Base URL and model will be set automatically
        }
    },
    # Other configurations...
)

Benefits

  • Easier setup for OpenRouter users through GUI and config files
  • Auto-configuration of OpenRouter-specific settings
  • Better user experience for those using the Windows .exe installer
  • Flexible model selection through OpenRouter's auto-routing capabilities

References

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