Skip to content

[Bug]: Some Env Variables cannot be resolved #770

@supergeoff

Description

@supergeoff

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • I am using the latest version of Moltis
  • If this happened during a chat session, I included as much full session context as possible and redacted secrets

What happened?

Some Env variable set in the UI cannot be resolved in the toml configuration.
SETUP :

Perplexity-specific settings (when provider = "perplexity")

Routed through OpenRouter to reuse the existing openrouter key

[tools.web.search.perplexity]
base_url = "https://openrouter.ai/api/v1"
model = "perplexity/sonar"
api_key = "${OPENROUTER_API_KEY}"

fail call, but if i rename the key in PERPLEXITY_API_KEY it works.

Same for GROQ_API_KEY (KO for STT)

Most of those KEY I had to put in docker -e

I feel there is an issue. I though maybe the UI variables are not available in the toml but on the other hand the GITHUB_TOKEN set in the UI has no issue to work on the mcp...

Expected behavior

All variables should have the same behavior with a strict predecesor :
runtime -e > toml env > UI env ?

Steps to reproduce

  1. add an MCP in the toml with variable interpolation
  2. test with the variable set in the UI
  3. test with the variable set in the runtime -e
  4. test with custom env and preset env variable...

Did this happen during a chat session?

None

Chat session context (if applicable)

Error messages / logs

Is this a regression?

I don't know

Last working version

No response

Moltis version

20260417.01

Component

Gateway / Web UI

Install method

Docker

Operating system

Ubuntu / Debian

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions