Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding environment variables to define the model to use #6524

Open
svaningelgem opened this issue Jan 29, 2025 · 0 comments
Open

Adding environment variables to define the model to use #6524

svaningelgem opened this issue Jan 29, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@svaningelgem
Copy link

Summary
Add support for configuring the AI model settings through environment variables, allowing users to specify model configurations in docker-compose files rather than through the Advanced Options UI.

Motivation
Currently, users need to navigate to the Advanced Options interface and manually input model configurations. This approach has several limitations:

  • It requires manual intervention for each deployment
  • Makes it difficult to version control model configurations
  • Complicates automated deployments and CI/CD pipelines
  • Increases the likelihood of configuration errors across different environments
  • Creates friction when sharing configurations across team members

By supporting environment variables, we can streamline the deployment process and align with Docker best practices for configuration management.

Technical Design

Proposed Environment Variables

OPENHANDS_MODEL_PROVIDER=openai|anthropic|other_providers
OPENHANDS_MODEL_NAME=gpt-4|claude-3|etc
OPENHANDS_API_KEY=your_api_key
OPENHANDS_API_BASE_URL=https://api.example.com  # Optional, for custom endpoints

example docker file

version: '3'
services:
  openhands:
    image: openhands:latest
    environment:
      - OPENHANDS_MODEL_PROVIDER=anthropic
      - OPENHANDS_MODEL_NAME=claude-3
      - OPENHANDS_API_KEY=${ANTHROPIC_API_KEY}

Alternatives to Consider

  • the configuration file can be used (but then you need to define it both in the config file and in docker-compose (for ollama for example))

Additional context

@mamoodi mamoodi added the enhancement New feature or request label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants