Configure Red Hat AI providers in the Ansible VS Code extension
You can configure the Ansible VS Code extension to interact with models hosted on Red Hat AI infrastructure such as the RHEL AI Inference Server and OpenShift AI.
Before you begin
- You have installed the Ansible VS Code extension version 25.12.3 or later.
- You already deployed and can access the Red Hat AI infrastructure (RHEL AI Inference Server or OpenShift AI).
- You have the API endpoint URL for the inference server.
- You have a valid API key or credential for the target model.
- You know the specific Model Name.
About this task
This integration enables you to use the "Bring Your Own LLM" (BYOLLM) capability to generate and explain Ansible playbooks and roles. You can use your own hosted models, such as Llama, Mistral, or OpenAI, without requiring external middleware.
Procedure
Results
- Open an Ansible playbook or role file in the editor.
- Check the status bar to verify that the Red Hat AI provider status is displayed and indicates a successful connection.
- Right-click within the editor and trigger . If the configuration is correct, the extension generates content using the model hosted on your RHEL AI or OpenShift AI infrastructure.
- Issue: The extension fails to connect or times out.
Resolution: Verify that the API Endpoint URL is reachable from your network. The extension has a default timeout of 30 seconds. Check the Output view in VS Code under the Ansible Lightspeed channel for specific error logs.
- Issue: Inline suggestions (ghost text) do not appear while typing.
Resolution: This is expected behavior. Inline task suggestions and content source matching are not supported for Red Hat AI infrastructure providers.