The Ansible VS Code extension's Coding Assistant supports Bring Your Own Model (BYOM), and IBM watsonx was the first external provider it supported, available since AAP 2.5. This is separate from the Intelligent Assistant chatbot in the AAP UI, which does not support watsonx. Below is a reference settings.json snippet for wiring the extension to a watsonx deployment.

{
  "ansible.lightspeed.enabled": true,
  "ansible.lightspeed.URL": "https://your-aap-instance.example.com",
  "ansible.lightspeed.modelProvider": "watsonx",
  "ansible.lightspeed.watsonx.projectId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "ansible.lightspeed.watsonx.deploymentId": "ansible-coding-assistant-prod",
  "ansible.lightspeed.watsonx.region": "eu-de"
}

The corresponding controller-side model configuration, set by an AAP admin under Automation Decisions > AI Model Configurations:

---
- name: Register IBM watsonx as a Coding Assistant model provider
  hosts: localhost
  gather_facts: false
  vars:
    aap_controller_host: "https://aap.example.com"
    watsonx_api_key: "{{ lookup('env', 'WATSONX_API_KEY') }}"
  tasks:
    - name: Create watsonx credential in AAP
      ansible.controller.credential:
        name: "watsonx-coding-assistant-cred"
        organization: "Platform Engineering"
        credential_type: "IBM watsonx"
        inputs:
          api_key: "{{ watsonx_api_key }}"
          project_id: "a1b2c3d4-5678-90ab-cdef-1234567890ab"
          url: "https://eu-de.ml.cloud.ibm.com"
        controller_host: "{{ aap_controller_host }}"

    - name: Register the model configuration for the Coding Assistant
      ansible.controller.model_configuration:
        name: "watsonx-coding-assistant"
        credential: "watsonx-coding-assistant-cred"
        feature: "coding_assistant"
        model_id: "granite-20b-code-instruct"
        controller_host: "{{ aap_controller_host }}"

What this does

The settings.json block points the VS Code extension at your AAP controller and tells it to route inference requests for the Coding Assistant feature to watsonx, using the project and deployment IDs from your IBM Cloud or watsonx.ai instance. The playbook automates the admin-side setup: it stores the watsonx API key as a credential in AAP, then creates a model configuration record that maps the coding_assistant feature to that credential and a chosen model (here, granite-20b-code-instruct). Once both pieces are in place, inline task suggestions, playbook completions, and explanation requests in VS Code are served by watsonx instead of the default Red Hat AI model.

Notes / Gotchas

  • watsonx support is scoped to the Coding Assistant only. If you try to point the Intelligent Assistant chatbot at watsonx, it will not work — that surface only accepts Red Hat AI, OpenAI, and Azure OpenAI today, with Google Gemini/Vertex listed as coming soon.
  • AAP 2.5 is the minimum platform version for watsonx as a Coding Assistant backend; other BYOM providers for this feature (OpenAI, Azure OpenAI) require newer platform versions and were still listed as "Coming Soon" as of Red Hat Tech Day Netherlands 2026.
  • Store WATSONX_API_KEY in your automation controller's secret management (e.g., Vault lookup) rather than plaintext — the example above uses an environment lookup only for brevity.
  • If you're also enabling BYOK (Bring Your Own Knowledge, Tech Preview) to ground the Intelligent Assistant's RAG pipeline in your own runbooks and compliance procedures, remember that's a distinct feature from the Coding Assistant's model backend and is configured separately.

Once watsonx is registered as the model provider, restart the VS Code extension host and confirm the connection status in the extension's Lightspeed panel before relying on it for production suggestions.

References