# Pi

Connect Pi to Blaschke through its OpenAI-compatible provider and choose an exact model ID from model discovery.

## Configure the provider.

Merge this complete `blaschke` provider into `~/.pi/agent/models.json`, preserving unrelated providers and settings. It includes all currently available models, their limits and preview rates, and model-specific reasoning controls.

### ~/.pi/agent/models.json

```json
{
  "$schema": "https://pi.dev/schemas/models.schema.json",
  "providers": {
    "blaschke": {
      "name": "Blaschke",
      "baseUrl": "https://beta.blaschkelabs.com/v1",
      "api": "openai-completions",
      "apiKey": "$BLASCHKE_API_KEY",
      "authHeader": true,
      "models": [
        {
          "id": "qwen3.8-27b-rana-abliterated-fp8",
          "name": "Qwen3.8 · 27B RANA · FP8",
          "reasoning": true,
          "input": [
            "text",
            "image"
          ],
          "inputLimits": {
            "images": {
              "maxPerMessage": 4,
              "maxPerRequest": 4,
              "resize": {
                "maxWidth": 1568,
                "maxHeight": 1568,
                "maxBytes": 750000,
                "jpegQuality": 80
              }
            }
          },
          "contextWindow": 153600,
          "maxTokens": 16384,
          "samplingParams": {
            "temperature": 1,
            "top_p": 0.95,
            "top_k": 20,
            "min_p": 0,
            "repeat_penalty": 1
          },
          "thinkingLevelMap": {
            "off": "none",
            "minimal": null,
            "low": "low",
            "medium": "medium",
            "high": null,
            "xhigh": "xhigh",
            "max": null
          },
          "cost": {
            "input": 0.3,
            "output": 0.3,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStore": false,
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "maxTokensField": "max_tokens",
            "supportsStrictMode": false,
            "thinkingFormat": "chat-template",
            "chatTemplateKwargs": {
              "reasoning_effort": {
                "$var": "thinking.effort"
              },
              "enable_thinking": {
                "$var": "thinking.enabled"
              },
              "preserve_thinking": true
            }
          }
        },
        {
          "id": "inkling-2-mini-uncensored-gguf",
          "name": "Inkling 2 Mini · Uncensored",
          "reasoning": true,
          "input": [
            "text"
          ],
          "contextWindow": 32768,
          "maxTokens": 8192,
          "samplingParams": {
            "temperature": 1,
            "top_p": 0.95,
            "top_k": 20,
            "min_p": 0,
            "repeat_penalty": 1
          },
          "thinkingLevelMap": {
            "off": "none",
            "minimal": "minimal",
            "low": "low",
            "medium": "medium",
            "high": "high",
            "xhigh": "xhigh",
            "max": "max"
          },
          "cost": {
            "input": 0.3,
            "output": 0.3,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStore": false,
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "maxTokensField": "max_tokens",
            "supportsStrictMode": false,
            "thinkingFormat": "chat-template",
            "chatTemplateKwargs": {
              "reasoning_effort": {
                "$var": "thinking.effort"
              }
            }
          }
        },
        {
          "id": "qwen3.6-35b-a3b-abliterated-gguf",
          "name": "Qwen3.6 · 35B-A3B Abliterated",
          "reasoning": true,
          "input": [
            "text"
          ],
          "contextWindow": 32768,
          "maxTokens": 16384,
          "samplingParams": {
            "temperature": 1,
            "top_p": 0.95,
            "top_k": 20,
            "min_p": 0,
            "repeat_penalty": 1
          },
          "thinkingLevelMap": {
            "off": "none",
            "minimal": null,
            "low": null,
            "medium": "on",
            "high": null,
            "xhigh": null,
            "max": null
          },
          "cost": {
            "input": 0.3,
            "output": 0.3,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStore": false,
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "maxTokensField": "max_tokens",
            "supportsStrictMode": false,
            "thinkingFormat": "chat-template",
            "chatTemplateKwargs": {
              "reasoning_effort": {
                "$var": "thinking.effort"
              },
              "enable_thinking": {
                "$var": "thinking.enabled"
              },
              "preserve_thinking": true
            }
          }
        }
      ]
    }
  }
}
```

- Keep `apiKey` as `$BLASCHKE_API_KEY`; Pi resolves it when making a request, so no secret is stored in the JSON.
- Use `/model` to choose a model and `/thinking` to choose a supported reasoning level. Unsupported levels are disabled by the model's `thinkingLevelMap`.
- When models change, update their IDs, limits, rates and controls from `GET /v1/models` and the model documentation.

## Check the connection.

Use your API key to list models without running inference.

### List available models

```shell
curl --fail --silent --show-error https://beta.blaschkelabs.com/v1/models \
  -H "Authorization: Bearer $BLASCHKE_API_KEY" \
```

**A limited readiness check.** Expect `200` and your selected model ID in the response. This checks the key and model metadata; it does not send inference.

## Launch Pi.

After configuring the provider and confirming model availability, select them explicitly.

### Launch Pi

```shell
export BLASCHKE_API_KEY="blsk_..."
export BLASCHKE_MODEL="<exact-model-id>"
pi --provider blaschke --model "$BLASCHKE_MODEL"
```

For an explicitly read-only session, add `--tools read,find,grep,ls`. Do not broaden local execution permissions just because the gateway accepts tool definitions.

## Verify one authorized tool call.

Ask Pi to read `package.json` and answer from its actual tool result. Pi executes the read; Blaschke relays the call and its result.

### Read-only test

```text
Read package.json using a permitted read tool. Do not run shell commands or write files. Summarize the project's name and scripts from the returned tool result.
```

- Check that the model proposes a call with an ID and valid JSON arguments.
- Allow Pi to execute only the requested read.
- Return the matching tool result and confirm that the summary uses its content.

## Related guides

- [Detailed Pi setup prompt](https://beta.blaschkelabs.com/docs/agents/setup): Use a fully scoped read-only configuration test.
- [Function tools](https://beta.blaschkelabs.com/docs/tools): Review schemas, call IDs and result history.

Source: https://beta.blaschkelabs.com/docs/agents/coding-agents/pi

Markdown: https://beta.blaschkelabs.com/docs/md/agents/coding-agents/pi.md
