Skip to content

Multiple sets of environment variables are available for you to choose from. #455

Open

Description

@hujingnb

Hello, thank you for developing the tool. It's very useful.

I have different Claude API service providers, so I need to switch between them. I think this is not just my need.

Can multiple sets of environment variables be provided, with each set allowing for a custom batch of environment variables? In this way, when switching service providers, only the selection of environment variables is required.

Activity

  1. nasa8x commented on Apr 15, 2026

    @nasa8x

    Yes, I also want to run other local models like LM Studio and Ollama. Even though the environment variables have been configured, it's not running. The application only allows two ANTHROPIC models.

  2. nasa8x commented on Apr 27, 2026

    @nasa8x

    I found Emdash.sh (https://github.com/generalaction/emdash) to be a similar project that handles everything.

  3. lsjwzh commented on Sep 4, 2026

    @lsjwzh

    One design detail worth considering: make these named provider profiles and bind a profile to each session, rather than copying the selected variables into one global environment. Otherwise switching provider A can mutate or restart sessions already using B, and stale variables are easy to leak across launches.

    MultiCC uses the per-session model: each CLI session keeps its own provider, endpoint, and model plus an isolated environment (including CODEX_HOME where applicable), so different Anthropic- or OpenAI-compatible providers can run concurrently. This may be a useful reference implementation.

    For opcode, a minimal shape could be ProviderProfile { id, name, env } plus providerProfileId on each session. Materialize the variables only when spawning that session, and never rewrite the parent process environment. That would also leave room for LM Studio and Ollama adapters without special-casing each one in the profile UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions