{
  "slug": "pi-unknown-provider-azure-openai-responses",
  "url": "https://insidetheloop.dev/fixes/pi-unknown-provider-azure-openai-responses",
  "markdown_url": "https://insidetheloop.dev/fixes/pi-unknown-provider-azure-openai-responses.md",
  "title": "Pi: \"Error: Unknown provider \\\"azure-openai-responses\\\"\"",
  "description": "Pi 1.0.3 renamed Azure's provider to azure. Use --provider azure and rename keys in auth.json, models.json, and .pi/settings.json.",
  "tool": {
    "id": "pi",
    "name": "Pi coding agent",
    "long_name": "Pi coding agent (pi)",
    "url": "https://insidetheloop.dev/tools/pi",
    "latest_version": "1.1.0"
  },
  "error": "Error: Unknown provider \"azure-openai-responses\". Use --list-models to see available providers/models.",
  "variants": [],
  "output": "Error: Unknown provider \"azure-openai-responses\". Use --list-models to see available providers/models.",
  "exit_code": 1,
  "command": "pi --provider azure-openai-responses --model gpt-4o -p \"test\"",
  "versions": {
    "affected": "1.0.3 and later",
    "first_bad": "1.0.3",
    "last_good": "1.0.2",
    "fixed_in": null,
    "tested": [
      "1.0.2",
      "1.0.3",
      "1.1.0"
    ]
  },
  "cause": "Pi 1.0.3 (released 2026-10-05T08:38:23Z) renamed the provider `azure-openai-responses` to `azure`, so passing the legacy provider name fails validation.",
  "fix": {
    "summary": "Replace `azure-openai-responses` with `azure` in CLI commands and configuration files.",
    "commands": [
      "# CLI invocation: pass --provider azure instead of --provider azure-openai-responses",
      "pi --provider azure --model gpt-4o -p \"test\"",
      "# In auth.json: rename the \"azure-openai-responses\" provider key to \"azure\"",
      "# In models.json: rename \"azure-openai-responses\" under \"providers\" to \"azure\"",
      "# In .pi/settings.json: update defaultProvider and model patterns to use \"azure\""
    ],
    "note": "Pi 1.0.3 renamed the provider to support Azure Foundry Chat Completions deployments alongside the Responses API under a single provider ID. Existing `AZURE_OPENAI_*` environment variables (`AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_BASE_URL`, `AZURE_OPENAI_RESOURCE_NAME`) remain unchanged."
  },
  "reproduction": {
    "ran_at": "2026-10-10T12:34:43Z",
    "environment": "A fresh Debian 13 VM from `bin/sandbox-run` on pc (x86_64, Node.js 24, root, online, no credentials for any service), destroyed after the run.",
    "steps": [
      {
        "label": "Before: provider accepted, proceeds past resolution to credential check",
        "version": "1.0.2",
        "command": "pi --provider azure-openai-responses --model gpt-4o -p \"test\"",
        "output": "No API key found for azure-openai-responses.\n\nUse /login to log into a provider via OAuth or API key. See:\n  /opt/pi-1.0.2/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md\n  /opt/pi-1.0.2/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md",
        "exit": 1
      },
      {
        "label": "After: rejected by provider validation",
        "version": "1.0.3",
        "command": "pi --provider azure-openai-responses --model gpt-4o -p \"test\"",
        "output": "Error: Unknown provider \"azure-openai-responses\". Use --list-models to see available providers/models.",
        "exit": 1
      },
      {
        "label": "Same in the latest release",
        "version": "1.1.0",
        "command": "pi --provider azure-openai-responses --model gpt-4o -p \"test\"",
        "output": "Error: Unknown provider \"azure-openai-responses\". Use --list-models to see available providers/models.",
        "exit": 1
      },
      {
        "label": "Fix verified: passing azure succeeds through provider resolution",
        "version": "1.1.0",
        "command": "pi --provider azure --model gpt-4o -p \"test\"",
        "output": "No API key found for azure.\n\nUse /login to log into a provider via OAuth or API key. See:\n  /opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/providers.md\n  /opt/pi-1.1.0/lib/node_modules/@earendil-works/pi-coding-agent/docs/models.md",
        "exit": 1
      }
    ]
  },
  "why": {
    "text": "Pull request #9714 (merged 2026-10-05T07:46:49Z) shipped in Pi 1.0.3 (released 2026-10-05T08:38:23Z) and renamed the Azure provider from `azure-openai-responses` to `azure` to support Azure Foundry Chat Completions deployments (such as `azure/deepseek-v4-pro`) alongside Responses API models under a unified provider ID.",
    "url": "https://github.com/earendil-works/pi/pull/9714",
    "source": "earendil-works/pi PR #9714"
  },
  "tool_page": "https://insidetheloop.dev/tools/pi#gotcha-passing-legacy-provider-azure-openai-responses-fails-with-unknown-provider-error",
  "related": [
    {
      "slug": "pi-tools-cannot-mix-modifiers",
      "error": "Error: --tools: tool names cannot be mixed with +name or -name entries",
      "url": "https://insidetheloop.dev/fixes/pi-tools-cannot-mix-modifiers"
    }
  ],
  "sources": [
    {
      "title": "feat(ai): support Azure Foundry Chat Completions deployments (PR #9714)",
      "url": "https://github.com/earendil-works/pi/pull/9714",
      "read": "2026-10-10"
    },
    {
      "title": "Pi 1.0.3 release notes",
      "url": "https://github.com/earendil-works/pi/releases/tag/v1.0.3",
      "read": "2026-10-10"
    },
    {
      "title": "Pi 1.0.2 release notes",
      "url": "https://github.com/earendil-works/pi/releases/tag/v1.0.2",
      "read": "2026-10-10"
    },
    {
      "title": "Pi Azure provider source (v1.0.2)",
      "url": "https://github.com/earendil-works/pi/blob/v1.0.2/packages/ai/src/providers/azure-openai-responses.ts",
      "read": "2026-10-10"
    },
    {
      "title": "Pi 1.1.0 release notes",
      "url": "https://github.com/earendil-works/pi/releases/tag/v1.1.0",
      "read": "2026-10-10"
    },
    {
      "title": "Issue #10501: docs: providers.md Azure OpenAI section does not name the new azure provider id",
      "url": "https://github.com/earendil-works/pi/issues/10501",
      "read": "2026-10-10"
    },
    {
      "title": "Pi coding agent providers documentation (v1.1.0)",
      "url": "https://github.com/earendil-works/pi/blob/v1.1.0/packages/coding-agent/docs/providers.md#azure-openai",
      "read": "2026-10-10"
    },
    {
      "title": "Pi model resolver source (v1.1.0)",
      "url": "https://github.com/earendil-works/pi/blob/v1.1.0/packages/coding-agent/src/core/model-resolver.ts",
      "read": "2026-10-10"
    }
  ],
  "date_published": "2026-10-10T12:35:00Z",
  "date_modified": "2026-10-10T12:45:53Z",
  "verified": {
    "date": "2026-10-10",
    "versions": [
      "1.0.2",
      "1.0.3",
      "1.1.0"
    ]
  }
}
