Skip to content

feat(helm/kagent): allow disabling default modelconfig#2142

Open
anthonyhaussman wants to merge 2 commits into
kagent-dev:mainfrom
anthonyhaussman:tone/feat/helm-allow-disable-default-modelconfig
Open

feat(helm/kagent): allow disabling default modelconfig#2142
anthonyhaussman wants to merge 2 commits into
kagent-dev:mainfrom
anthonyhaussman:tone/feat/helm-allow-disable-default-modelconfig

Conversation

@anthonyhaussman

Copy link
Copy Markdown
Contributor

Wrap modelconfig and modelconfig-secret templates in a conditional check for .Values.providers.
This allows users to completely disable the default modelconfig generation by setting providers to null.

Add tests to verify that no documents are rendered when providers is null.

Copilot AI review requested due to automatic review settings July 3, 2026 09:22
@anthonyhaussman anthonyhaussman force-pushed the tone/feat/helm-allow-disable-default-modelconfig branch from 49e6d16 to 9491256 Compare July 3, 2026 09:22
@github-actions github-actions Bot added the enhancement New feature or request label Jul 3, 2026

Copilot AI 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.

Pull request overview

This PR updates the Helm chart’s default ModelConfig and Secret rendering so users can fully disable default model configuration generation by setting .Values.providers to null, and adds unit tests to validate the “render nothing” behavior.

Changes:

  • Wrap modelconfig.yaml and modelconfig-secret.yaml templates in if .Values.providers so they render no documents when providers is null.
  • Add helm-unittest coverage ensuring both templates render 0 documents when providers: null.
  • Minor whitespace cleanup in an existing test assertion value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
helm/kagent/templates/modelconfig.yaml Adds conditional guard around default ModelConfig rendering when providers is nil.
helm/kagent/templates/modelconfig-secret.yaml Adds conditional guard around default Secret rendering when providers is nil.
helm/kagent/tests/modelconfig_test.yaml Adds test asserting no documents rendered when providers: null.
helm/kagent/tests/modelconfig-secret_test.yaml Adds test asserting no documents rendered when providers: null (and fixes trailing whitespace).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread helm/kagent/templates/modelconfig-secret.yaml
Comment thread helm/kagent/templates/modelconfig.yaml Outdated
Wrap modelconfig and modelconfig-secret templates in a conditional
check for .Values.providers. This allows users to completely disable
the default modelconfig generation by setting providers to null.

Add tests to verify that no documents are rendered when providers
is null.

Signed-off-by: Anthony Hausman <anthony.hausman@backmarket.com>
Adds fallback validation in modelconfig-secret.yaml to prevent nil pointer errors when providers.default is missing or invalid. Also fixes the config key in modelconfig.yaml to correctly render the defaultProvider string instead of the potentially omitted map key.

Signed-off-by: Anthony Hausman <anthony.hausman@backmarket.com>
@anthonyhaussman anthonyhaussman force-pushed the tone/feat/helm-allow-disable-default-modelconfig branch from 9491256 to b006023 Compare July 3, 2026 09:49
@anthonyhaussman anthonyhaussman changed the title feat(helm): allow disabling default modelconfig feat(helm/kagent): allow disabling default modelconfig Jul 3, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants