Skip to content

Add support for DEFAULT_LLM_MODEL environment variable #637

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Abbeyme1
Copy link

@Abbeyme1 Abbeyme1 commented Jun 14, 2025

Summary

This PR introduces support for a new environment variable DEFAULT_LLM_MODEL to configure the default LLM model used by the web-ui. This eliminates the need to repeatedly set the model manually.

Changes Made

  • Added support for DEFAULT_LLM_MODEL in the executable script.

  • Updated code to fetch the model using:

    os.getenv("DEFAULT_LLM_MODEL", config.model_names[os.getenv("DEFAULT_LLM", "openai")][0])
  • Ensures a consistent and convenient way to define the default model through environment variables.


How to Test

  1. Set the environment variable before running:

    export DEFAULT_LLM_MODEL=gpt-4
  2. Start the web-ui

  3. The selected model should default to the value set in DEFAULT_LLM_MODEL without requiring manual selection.


Notes

  • If DEFAULT_LLM_MODEL is not set, fallback logic still uses the default model from config.model_names based on the DEFAULT_LLM provider or defaults to "openai".

Summary by cubic

Added support for the DEFAULT_LLM_MODEL environment variable to set the default LLM model in the web UI.

  • New Features
    • The web UI now uses DEFAULT_LLM_MODEL to pick the default model, so users no longer need to select it manually.
    • If DEFAULT_LLM_MODEL is not set, the app falls back to the existing default logic.

@CLAassistant
Copy link

CLAassistant commented Jun 14, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic reviewed 2 files and found no issues. Review PR in cubic.dev.

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.

2 participants