Skip to content

[Backport release/0.0.14] fix(tests): ignore .env under pytest except the LLM API keys - #4120

Open
github-actions[bot] wants to merge 1 commit into
release/0.0.14from
backport/4111-to-release/0.0.14
Open

[Backport release/0.0.14] fix(tests): ignore .env under pytest except the LLM API keys#4120
github-actions[bot] wants to merge 1 commit into
release/0.0.14from
backport/4111-to-release/0.0.14

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Description

Backport of #4111 to release/0.0.14.

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

Safe to merge from a blocking-risk perspective, but Moondream-backed pytest flows that rely on a local .env will remain unusable until its credential is preserved.

Findings

  1. P2 Preserve Moondream API Key

Summary

  • This change isolates pytest from general .env settings while retaining selected provider credentials. The credential allowlist omits the key required by the hosted Moondream provider, so pytest runs that rely on .env credentials cannot initialize that provider.

Reviews (1) · Last reviewed commit: "fix(tests): ignore .env under pytest exc..."

Comment thread dimos/conftest.py

load_dotenv()
_dotenv = dotenv_values()
for _key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "ALIBABA_API_KEY"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Preserve Moondream API Key

The pytest setup copies only OpenAI, Anthropic, and Alibaba credentials from .env, but the hosted Moondream model reads MOONDREAM_API_KEY and raises when it is absent. A pytest flow using a local .env for Moondream credentials therefore cannot initialize the model. This is non-blocking, but it makes supported Moondream test flows inconsistent with the other hosted providers.

Suggested change
for _key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "ALIBABA_API_KEY"):
for _key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "ALIBABA_API_KEY", "MOONDREAM_API_KEY"):
Artifacts

Evidence from the check

  • Evidence file captured while the check ran.

Evidence from the check

  • Evidence file captured while the check ran.

Command output from the check

  • The full command output behind this check.

Command output from the check

  • The full command output behind this check.

View artifacts

T-Rex Ran code and verified through T-Rex

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