Skip to content

🐛 Add enabled property to llm proxy client configmap#558

Merged
fabianvf merged 1 commit into
konveyor:mainfrom
abrugaro:1365-add-llm-proxy-enabled-property
May 19, 2026
Merged

🐛 Add enabled property to llm proxy client configmap#558
fabianvf merged 1 commit into
konveyor:mainfrom
abrugaro:1365-add-llm-proxy-enabled-property

Conversation

@abrugaro
Copy link
Copy Markdown
Contributor

@abrugaro abrugaro commented Apr 29, 2026

Relates to konveyor/editor-extensions#1365

Summary by CodeRabbit

  • Improvements
    • LLM Proxy client configuration now performs pre-checks for existing configurations
    • Expanded configuration logic to handle both new and existing client setups
    • Added new configuration option to control LLM Proxy client enabled status

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

This pull request enhances the Ansible playbook for Kai by adding a pre-check task to detect if the LLM Proxy client ConfigMap already exists and broadening the creation task's condition to accommodate both new deployments and updates to existing configurations. Additionally, an enabled field is added to the ConfigMap's embedded JSON configuration.

Changes

Cohort / File(s) Summary
Kai Proxy Configuration Task
roles/tackle/tasks/kai.yml
Added a pre-check task to register the existence of the LLM Proxy client ConfigMap. Modified the ConfigMap creation task condition to execute when either kai_llm_proxy_enabled is true or the ConfigMap already exists.
Kai Proxy ConfigMap Template
roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2
Added an enabled field to the embedded config.json derived from kai_llm_proxy_enabled (default: false). Updated the model field JSON syntax to support the new sibling field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A check before we create anew,
Ensuring configs get their due,
With enabled fields set just right,
The proxy shines both day and night! ✨

🚥 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 specifically describes the main change: adding an 'enabled' property to the LLM proxy client ConfigMap, which matches the actual modifications in both the playbook and template files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@roles/tackle/tasks/kai.yml`:
- Line 95: The task "Create LLM Proxy Client Configuration" is currently guarded
by "when: kai_llm_proxy_enabled | bool or
(llm_proxy_client_configmap_status.resources | length) > 0" which can skip
creation on fresh installs when kai_solution_server_enabled is true; update the
when condition to also allow the task to run when kai_solution_server_enabled |
bool is true (i.e., change the when to: kai_solution_server_enabled | bool or
kai_llm_proxy_enabled | bool or (llm_proxy_client_configmap_status.resources |
length) > 0) while keeping state: present so the ConfigMap is created on first
deploy.

In `@roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2`:
- Around line 15-16: The template emits the enabled flag as a JSON string;
change the enabled field to output a real JSON boolean by removing the
surrounding quotes and rendering the kai_llm_proxy_enabled variable through the
boolean/default filters so it produces true/false literals; update the template
line that references kai_llm_proxy_enabled in
roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2 (keep the model
line using kai_llm_proxy_provider_id and kai_llm_proxy_model_id unchanged).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db8de375-7dd9-44c1-a082-15d10eb6eb56

📥 Commits

Reviewing files that changed from the base of the PR and between 1fd9687 and a3dc75b.

📒 Files selected for processing (2)
  • roles/tackle/tasks/kai.yml
  • roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2

Comment thread roles/tackle/tasks/kai.yml
Comment thread roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2
Copy link
Copy Markdown
Member

@jmontleon jmontleon left a comment

Choose a reason for hiding this comment

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

LGTM

@djzager djzager added the cherry-pick/release-0.9 This PR should be cherry-picked to release-0.9 branch label Apr 29, 2026
djzager pushed a commit to konveyor/editor-extensions that referenced this pull request Apr 29, 2026
Resolves #1365 

Operator PR with new configmap property:
konveyor/operator#558

If the `enabled` property is not present in the configmap, it is assumed
to be true to ensure compatibility with older versions of the operator.
To prevent the bug from occurring, both the operator and the extension
will need to be updated

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* The LLM proxy client now supports an `enabled` configuration setting
to control whether the proxy is active in your environment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
djzager pushed a commit to konveyor/editor-extensions that referenced this pull request May 1, 2026
Resolves #1365

Operator PR with new configmap property:
konveyor/operator#558

If the `enabled` property is not present in the configmap, it is assumed
to be true to ensure compatibility with older versions of the operator.
To prevent the bug from occurring, both the operator and the extension
will need to be updated

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* The LLM proxy client now supports an `enabled` configuration setting
to control whether the proxy is active in your environment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
Co-authored-by: Alejandro Brugarolas <117646518+abrugaro@users.noreply.github.com>
ibolton336 pushed a commit to ibolton336/editor-extensions that referenced this pull request May 1, 2026
Resolves konveyor#1365

Operator PR with new configmap property:
konveyor/operator#558

If the `enabled` property is not present in the configmap, it is assumed
to be true to ensure compatibility with older versions of the operator.
To prevent the bug from occurring, both the operator and the extension
will need to be updated

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* The LLM proxy client now supports an `enabled` configuration setting
to control whether the proxy is active in your environment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
@fabianvf fabianvf merged commit 2e70672 into konveyor:main May 19, 2026
14 checks passed
@konveyor-ci-bot
Copy link
Copy Markdown

PR cherry-picked to branch release-0.9. Backport PR: #563

ibolton336 pushed a commit to ibolton336/editor-extensions that referenced this pull request May 20, 2026
Resolves konveyor#1365

Operator PR with new configmap property:
konveyor/operator#558

If the `enabled` property is not present in the configmap, it is assumed
to be true to ensure compatibility with older versions of the operator.
To prevent the bug from occurring, both the operator and the extension
will need to be updated

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* The LLM proxy client now supports an `enabled` configuration setting
to control whether the proxy is active in your environment.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/release-0.9 This PR should be cherry-picked to release-0.9 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants