Skip to content

OLS-3548 Expose temperatureSupported model parameter - #1993

Open
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:OLS-3548-temperature-supported
Open

OLS-3548 Expose temperatureSupported model parameter#1993
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:OLS-3548-temperature-supported

Conversation

@xrajesh

@xrajesh xrajesh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Exposes the temperature_supported model option (added to the service in openshift/lightspeed-service#3000) through the OLSConfig CR, so operator-managed clusters can disable the temperature parameter for models that reject it (e.g. claude-sonnet-5) and avoid HTTP 400 errors.

Changes

  • API — new temperatureSupported *bool field on ModelParametersSpec (api/v1alpha1/olsconfig_types.go).
  • Config generationbuildProviderConfigs passes the value through to the generated olsconfig parameters block (assets.go), serialized as temperature_supported.
  • Generated artifacts — regenerated deepcopy; CRD (config/crd + bundle) and CSV descriptors updated with just the new property.
  • Testsassets_test.go asserts the key is omitted when unset (service default applies) and propagated as false when set.

Design

*bool with omitempty is deliberate. The service default is true, so a plain bool could not distinguish unset from an explicit false. With a pointer:

  • unset → key omitted from the generated config → the service applies its own default (true). Single source of truth for the default; no risk of the operator's default drifting from the service.
  • explicit true/false → propagated verbatim.

This matches the existing *bool precedent in the CRD (logging, introspectionEnabled, auditEventsEnabled).

Usage

spec:
  llm:
    providers:
      - name: my-bedrock
        models:
          - name: anthropic.claude-sonnet-5
            parameters:
              temperatureSupported: false

Test plan

  • make test passes (appserver package includes new coverage)
  • make generate manifests produces the deepcopy/CRD changes (unrelated pre-existing TLS-profile regeneration drift excluded to keep the diff focused)

Note

The operator still mirrors only a subset of the service's ModelParameters (max_tokens_for_response, tool_budget_ratio, and now temperature_supported); reasoning_effort, reasoning_summary, verbosity, and temperature remain unexposed. A generic passthrough to close that gap systematically is worth a separate RFE.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added configuration support to indicate whether a model accepts temperature parameters.
    • Exposed the “Temperature Supported” setting in the configuration interface.
    • Preserved explicit false values while omitting the setting when unspecified.
  • Documentation
    • Updated configuration descriptors to explain the setting and its default behavior.

Add a temperatureSupported *bool field to ModelParametersSpec so users
can disable the temperature parameter for models that reject it (e.g.
claude-sonnet-5), mirroring the temperature_supported option added to
the service in openshift/lightspeed-service#3000.

The field is a pointer with omitempty: when unset it is omitted from the
generated olsconfig, letting the service apply its own default (true);
an explicit false is propagated verbatim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@openshift-ci

openshift-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign raptorsun for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 154a5be5-8d69-4a58-8afe-aa1d5f425d2d

📥 Commits

Reviewing files that changed from the base of the PR and between db97dd4 and 4d58565.

⛔ Files ignored due to path filters (3)
  • api/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated.deepcopy.go
  • bundle/manifests/ols.openshift.io_olsconfigs.yaml is excluded by !bundle/manifests/ols.openshift.io_olsconfigs.yaml
  • config/crd/bases/ols.openshift.io_olsconfigs.yaml is excluded by !config/crd/bases/**
📒 Files selected for processing (6)
  • api/v1alpha1/olsconfig_types.go
  • bundle/manifests/lightspeed-operator.clusterserviceversion.yaml
  • config/manifests/bases/lightspeed-operator.clusterserviceversion.yaml
  • internal/controller/appserver/assets.go
  • internal/controller/appserver/assets_test.go
  • internal/controller/utils/types.go

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds optional temperature-support fields to model configuration, documents them in OLM descriptors, propagates values into application-server configuration, and tests omitted and explicitly disabled settings.

Changes

Temperature support configuration

Layer / File(s) Summary
Configuration contract and descriptors
api/v1alpha1/olsconfig_types.go, internal/controller/utils/types.go, bundle/manifests/..., config/manifests/...
The model configuration types and OLM descriptors define the optional temperatureSupported setting and its default behavior.
Runtime propagation and validation
internal/controller/appserver/assets.go, internal/controller/appserver/assets_test.go
Provider configuration preserves the temperature-support value. Tests verify omission and explicit false serialization.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 4d585

This PR adds an optional model parameter and propagates explicit values while preserving the existing service default when unset; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: raptorsun, blublinsky, sriroopar

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: exposing the temperatureSupported model parameter.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@xrajesh

xrajesh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

LGTM

@openshift-ci

openshift-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

@xrajesh: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@blublinsky

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2026
@blublinsky

Copy link
Copy Markdown
Contributor

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants