Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions helm/kagent/templates/modelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
{{- with $model }}
provider: {{ .provider | quote }}
model: {{ .model | quote }}
{{- if hasKey $model "stream" }}
stream: {{ $model.stream }}
{{- end }}
{{- if $model.apiKeySecretRef }}
apiKeySecret: {{.apiKeySecretRef}}
{{- end }}
Expand Down
30 changes: 30 additions & 0 deletions helm/kagent/tests/modelconfig_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@ suite: test modelconfig
templates:
- modelconfig.yaml
tests:
- it: should preserve the API streaming default when unspecified
asserts:
- notExists:
path: spec.stream

- it: should preserve an explicit false streaming option
set:
providers.openAI.stream: false
asserts:
- equal:
path: spec.stream
value: false

- it: should preserve an explicit true streaming option
set:
providers.openAI.stream: true
asserts:
- equal:
path: spec.stream
value: true

- it: should use the selected provider streaming option
set:
providers.default: anthropic
providers.anthropic.stream: false
asserts:
- equal:
path: spec.stream
value: false

- it: should render modelconfig with default provider
asserts:
- hasDocuments:
Expand Down
2 changes: 2 additions & 0 deletions helm/kagent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ ui:
# https://kagent.dev/docs/getting-started/configuring-providers

providers:
# Each provider can set `stream: false` to disable LLM response streaming.
# When omitted, ModelConfig uses its API default (true).

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.

Can you add the value here so it's documented

default: openAI
# -- Annotations added to the metadata of the generated default ModelConfig
# (the one derived from `providers.default`). Omitted from the resource when empty.
Expand Down
Loading