WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
    • VMware Cloud Foundation 9.1
    • VMware Cloud Foundation 9.0
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple
You are here: Home / VMware Cloud Foundation / VCF 9.1.1 - Connecting Pi Coding Agent to VCF Private AI Services (PAIS)

VCF 9.1.1 - Connecting Pi Coding Agent to VCF Private AI Services (PAIS)

09.17.2026 by William Lam // Leave a Comment

If you have used Claude Code, Cursor, or OpenAI Codex, you have already experienced Agentic AI, whether it is coding an application, creating a quick script, or debugging an issue. The use cases are infinite, and like many, you can easily burn through your token quota when using the latest state-of-the-art Frontier AI models, which are simply amazing!

While spending some time playing with our latest VCF Private AI Services (PAIS) release (here and here), I have also been trading notes with colleagues doing something similar but rolling their own local AI stack using just vSphere Kubernetes Service (VKS) running on VMware Cloud Foundation (VCF) 9.1.1. Through those conversations, I came to learn about Pi, not the number, but a lightweight coding agent and agent harness that can connect to a number of AI model providers, including those providing an OpenAI-compatible endpoint.

Since VCF PAIS provides an OpenAI-compatible endpoint that can serve one or more AI models, you can now have your own Agentic AI using Pi running within your on-premises environment using various open weight models! 😎

Requirements:

  • VCF Private AI Services (PAIS) Model Endpoint deployed w/generated API Token

Step 1 - Install Pi on your local system that has connectivity to the PAIS Model Endpoint URL

Step 2 - Initialize Pi by running pi and then press Ctrl+C to exit. This initial launch will create the .pi directory within your home directory, which we will use in the next step

Step 3 - Create the ~/.pi/agent/models.json file and configure it with the PAIS base URL and model ID, which must match the model ID configured in PAIS. You can also specify additional model settings such as the context window and maximum number of tokens to use

{
    "providers": {
        "vcf": {
            "baseUrl": "https://model.vcf.lab/api/v1/compatibility/openai/v1",
            "api": "openai-completions",
            "apiKey": "${PAIS_API_KEY}",
            "models": [
                {
                    "id": "qwen3.8-27b",
                    "name": "Qwen 3.8 27B (VCF Lab)",
                    "reasoning": true,
                    "input": [
                        "text"
                    ],
                    "contextWindow": 60000,
                    "maxTokens": 4096,
                    "thinkingLevelMap": {
                        "minimal": "low",
                        "low": "low",
                        "medium": "medium",
                        "high": "xhigh",
                        "xhigh": "xhigh",
                        "max": null
                    },
                    "compat": {
                        "thinkingFormat": "chat-template",
                        "chatTemplateKwargs": {
                            "enable_thinking": {
                                "$var": "thinking.enabled"
                            },
                            "reasoning_effort": {
                                "$var": "thinking.effort",
                                "omitWhenOff": true
                            }
                        }
                    }
                }
            ]
        }
    }
}

Step 4 - Set the following environment variables to disable validation of the self-signed TLS certificate and provide the API token required to authenticate with the PAIS Model Endpoint.

export NODE_TLS_REJECT_UNAUTHORIZED=0
export PAIS_API_KEY="..."

Note: The apiKey property in the models.json file references the PAIS_API_KEY environment variable, so make sure the names match.

Step 5 - To launch Pi using your PAIS model, specify the provider ID and model ID configured in the models.json file. In our example, the provider ID is vcf and the model ID is qwen3.8-27b.

pi --model vcf/qwen3.8-27b

You have now successfully connected the Pi coding agent to your PAIS Model Endpoint and can begin interacting with your locally hosted AI model! 🥳

Note: For my setup, I was using an NVIDIA RTX A4000 (20GB VRAM) running the quantized Qwen3.8 27B model (Qwen3.8-27B-UD-Q4_K_S.gguf), which was able to sustain ~15 tokens per second (TPS) and was very usable for the tasks I was performing with Pi. Due to thermal throttling while running the A4000 inside the Minisforum MS-A2, I eventually moved the GPU to another system with better airflow, which eliminated the thermal throttling and its impact on TPS. I recently came to learn about this Local Model Explorer app that someone built that can help you identify models that can run on your specific hardware.

Categories // VMware Cloud Foundation Tags // VCF 9.1.1

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VCF 9.1.1 - Connecting Pi Coding Agent to VCF Private AI Services (PAIS) 09/17/2026
  • Quick Tip - Automating vDefend Security Services Platform (SSP) 5.2.0 Installer OVA Deployment 09/16/2026
  • VCF 9.1.1 - Simplified vSphere Kubernetes Service (VKS) using VLAN-Backed VPCs without NSX Tunnel Endpoints (TEPs) 09/15/2026
  • VCF 9.1.1 - Using VCF Private AI Services (PAIS) Models with AI Assistant for VCF 09/11/2026
  • VCF 9.1.1 - Deploying Your Own AI Models with VCF Private AI Services (PAIS) 3.0 09/10/2026
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2026