Skip to content

feat(maxkernel): allow configuring MODEL_NAME via environment variable - #141

Open
stingram wants to merge 2 commits into
mainfrom
feature/configurable-model-name
Open

stingram wants to merge 2 commits into
mainfrom
feature/configurable-model-name

Conversation

@stingram

@stingram stingram commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Allow overriding the default model name in MaxKernel via the MODEL_NAME environment variable.

Changes

  • Updated maxkernel/adk/auto_agent/constants.py to read MODEL_NAME from os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview").
  • Updated maxkernel/adk/hitl_agent/constants.py to read MODEL_NAME from os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview").

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates the "MODEL_NAME" constant in both "auto_agent/constants.py" and "hitl_agent/constants.py" to be loaded from the environment variable "MODEL_NAME" with a fallback default. The feedback recommends using the "or" operator when retrieving the environment variable to ensure that empty string values also correctly fall back to the default model name.

Comment thread maxkernel/adk/auto_agent/constants.py Outdated
MODEL_NAME = "gemini-3.1-pro-preview"
import os

MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview")

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.

medium

If the MODEL_NAME environment variable is defined but empty (e.g., MODEL_NAME=""), os.environ.get will return the empty string instead of falling back to the default value. This can cause downstream initialization failures. Using or ensures that any falsy or empty value falls back to the default model name.

Suggested change
MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview")
MODEL_NAME = os.environ.get("MODEL_NAME") or "gemini-3.1-pro-preview"

Comment thread maxkernel/adk/hitl_agent/constants.py Outdated
MODEL_NAME = "gemini-3.1-pro-preview"
import os

MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview")

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.

medium

If the MODEL_NAME environment variable is defined but empty (e.g., MODEL_NAME=""), os.environ.get will return the empty string instead of falling back to the default value. This can cause downstream initialization failures. Using or ensures that any falsy or empty value falls back to the default model name.

Suggested change
MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview")
MODEL_NAME = os.environ.get("MODEL_NAME") or "gemini-3.1-pro-preview"

Support overriding the default model name using the MODEL_NAME environment variable in auto_agent and hitl_agent.
@stingram
stingram force-pushed the feature/configurable-model-name branch from cb1f0f6 to cb10413 Compare November 16, 2026 23:48
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