npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-coralbricks-provider

v1.0.19

Published

CoralBricks provider extension for pi - Access GLM 5.3, GLM 5.3 Flash, and DeepSeek V4.1 Flash through the Coral Inference API

Readme

🪸 pi-coralbricks-provider

GLM 5.3, GLM 5.3 Flash & DeepSeek V4.1 Flash through Coral Bricks

A pi provider extension for Coral's OpenAI-compatible inference gateway — up to 1M context on open models.

pi extension npm license synbad


Features

  • 3 reasoning models from Coral's live catalog — GLM 5.3 FP4, GLM 5.3 Flash, and DeepSeek V4.1 Flash
  • 1M token context on GLM and DeepSeek, with vision (image input) on GLM 5.3 Flash and DeepSeek V4.1 Flash
  • OpenAI-compatible API — standard /v1/chat/completions, streaming, and tool calling
  • Per-family thinking levels — zai-style thinking control for GLM (including a real off switch), reasoning_effort for DeepSeek V4.1 Flash
  • Accurate cost tracking — input, cache-write and output rates mirror Coral's published pricing, and cached reads are $0 on every model
  • Self-healing model sync — stale-while-revalidate from the authenticated /v1/models (or the unauthenticated public catalog before auth), hot-swapped at session start
  • synbad-validated — synbad tool-calling and reasoning-parsing evals pass 13/13 in every run on GLM 5.3 in both unary and streaming modes

Installation

Option 1: Using pi install (Recommended)

Install directly from GitHub:

pi install https://github.com/monotykamary/pi-coralbricks-provider

or from npm:

pi install npm:pi-coralbricks-provider

Then set your API key and run pi:

# Recommended: add to auth.json
# See Authentication section below

# Or set as environment variable
export CORALBRICKS_API_KEY=cb_your-key-here

pi

Option 2: Manual Clone

  1. Clone this repository:

    git clone https://github.com/monotykamary/pi-coralbricks-provider.git
    cd pi-coralbricks-provider
    bun install
  2. Set your Coral API key:

    # Recommended: add to auth.json
    # See Authentication section below
    
    # Or set as environment variable
    export CORALBRICKS_API_KEY=cb_your-key-here
  3. Run pi with the extension:

    pi -e /path/to/pi-coralbricks-provider

Available Models

| Model | Context | Vision | Reasoning | Input $/M | Cache Read $/M | Cache Write $/M | Output $/M | |-------|---------|--------|-----------|-----------|-----------------|------------------|------------| | DeepSeek V4.1 Flash | 1.0M | ✅ | ✅ | $0.30 | — | $0.09 | $1.20 | | GLM 5.3 Flash | 1.0M | ✅ | ✅ | $0.15 | — | $0.23 | $0.50 | | GLM 5.3 FP4 | 1.0M | ❌ | ✅ | $1.12 | — | $1.68 | $4.40 |

Costs are per million tokens. Cache Read shows — because Coral bills cached input at $0 on every model. Prompt tokens Coral has not cached yet are billed once at the Cache Write rate, in place of the Input rate. Prices subject to change — check Coral's live catalog.

Usage

After loading the extension, use the /model command in pi to select your preferred model:

/model coralbricks glm-5.3-fp4

Or start pi directly with a Coral model:

pi -e /path/to/pi-coralbricks-provider --model coralbricks/deepseek-v4.1-flash-fast-fp4:high

Thinking levels attach to the model id with :<level> — e.g. :low, :high, :max, or :off (GLM and DeepSeek).

Authentication

The Coral API key can be configured in multiple ways (resolved in this order):

  1. auth.json (recommended) — Add to ~/.pi/agent/auth.json:
    { "coralbricks": { "type": "api_key", "key": "cb_your-key" } }
    The key field supports literal values, env var names, and shell commands (prefix with !).
  2. Runtime override — Use the --api-key CLI flag
  3. Environment variable — Set CORALBRICKS_API_KEY

With localterm, store it once and it's exposed everywhere:

localterm secret set coralbricks_api_key

Coral Inference is currently in a design-partner program — mint keys at coralbricks.ai/api-keys. Newly-minted keys may take ~30 seconds to be honored, and 403 access_denied means the account isn't on the allowlist yet.

Thinking Levels

Verified against the live gateway:

| Model | Format | off | low | medium | high | max | |-------|--------|-----|-----|--------|------|-----| | GLM 5.3 FP4 | thinking: {type} + reasoning_effort | ✅ | ✅ | — | ✅ | ✅ | | GLM 5.3 Flash | thinking: {type} + reasoning_effort | ✅ | ✅ | — | ✅ | ✅ | | DeepSeek V4.1 Flash | reasoning_effort | ✅ | ✅ | — | ✅ | ✅ |

  • GLM accepts zai-style thinking: {type: "disabled"} on Coral — pi's off level turns thinking off, though a short preamble of a few dozen tokens can still appear (the upstream Z.ai API has no off at all, so this differs from the canonical Z.ai map).
  • DeepSeek V4.1 Flash reasons only when asked: a request without reasoning_effort, or with "none", gets no reasoning, which is what pi's off sends. thinking: {type} has no effect on this model.
  • Coral streams a duplicate reasoning field alongside reasoning_content; pi dedupes these automatically.

Compat Settings

Coral's gateway follows the OpenAI Chat Completions API:

  • supportsStore: false / supportsDeveloperRole: false — all models; Coral serves open models on the classic roles.
  • maxTokensField: "max_tokens" — all models.
  • thinkingFormat: "zai" — GLM 5.3: thinking: {type: "enabled"|"disabled"} toggles reasoning, reasoning_effort picks the depth.
  • thinkingFormat: "openai" — DeepSeek V4.1 Flash: reasoning_effort drives thinking depth.

Patch Overrides & Custom Models

  • patch.json — per-model overrides applied on top of models.json (reasoning flags, pricing corrections, compat settings, thinking level maps). Currently carries two entries: GLM 5.3 Flash (reasoning, image input, its thinking level map and compat settings) and DeepSeek V4.1 Flash (reasoning, its thinking level map and compat settings).
  • custom-models.json — full model definitions for models Coral doesn't list. Merged after patch.

Merge order: [live|cache|embedded] → patch.json → custom-models.json

Inference-Quality Testing

Validated with synbad — Synthetic's tool-calling and reasoning-parsing eval suite for LLM inference providers (current 13-eval suite, --reasoning-effort high, five --count 1 runs per mode on 2026-09-15, DeepSeek on 2026-09-22; a cell shows the evals that passed in every run):

| Model | Unary | Stream | Notes | |-------|-------|--------|-------| | GLM 5.3 FP4 | 13/13 ✅ | 13/13 ✅ | 5/5 runs | | GLM 5.3 Flash | 12/13 ⚠️ | 12/13 ⚠️ | reasoning/reasoning-parsing passes 4 of 5 runs; see below | | GPT-OSS 120B (retired) | 12/13 ⚠️ | 12/13 ⚠️ | tools/parallel-tool 0 of 5 runs, before Coral retired the model | | DeepSeek V4.1 Flash | 12/13 ⚠️ | 12/13 ⚠️ | tools/octo-list-no-optional-args passes 1 of 5 runs; see below | | Kimi K3 (retired) | 13/13 ✅ | 13/13 ✅ | 5/5 runs, before Coral retired the model | | GLM 5.2 FP4 (retired) | 15/15 ✅ | 15/15 ✅ | 15-eval suite, single run, before Coral retired the model |

The misses are model-side, not transport: gpt-oss answered "Paris and London" with one call after another instead of two parallel calls even when parallel_tool_calls: true, in every run; on the trivial prompt reasoning-parsing uses, GLM 5.3 Flash answers without a think block about one run in five, in both modes, with the answer itself unaffected; and asked to "call the list tool with no args", DeepSeek V4.1 Flash usually fills in the optional dirPath as ".".

Reproduce:

CORALBRICKS_API_KEY=cb_... node ../synbad/dist/source/index.js eval \
  --env-var CORALBRICKS_API_KEY \
  --base-url https://inference.coralbricks.ai/v1 \
  --model glm-5.3-fp4 --count 1 --reasoning-effort high

Updating Models

Run the update script to fetch the latest models from Coral's API:

export CORALBRICKS_API_KEY=cb_your-key
node scripts/update-models.js

This will:

  1. Fetch models from https://inference.coralbricks.ai/v1/models (falls back to the unauthenticated public catalog without a key)
  2. Preserve existing model data (pricing, compat, thinking maps) for known models
  3. Apply overrides from patch.json
  4. Update models.json and the README model table

To regenerate just the README model table from local data — no API key needed:

node scripts/update-models.js --readme-only

Troubleshooting

| Symptom | Meaning | |---------|---------| | 403 access_denied | Account not on the Coral Inference allowlist yet | | 404 model_not_accepted | Model id not enabled for your key | | 401 invalid_api_key | Re-mint at coralbricks.ai/api-keys; fresh keys take ~30s to activate | | 429 rate_limit_exceeded | Per-key rate limit — retry with backoff | | 502 upstream_error / 503 backend_unconfigured | Transient — retry | | 504 timeout | Sync request waited too long; re-issue smaller or use Coral's background Responses API |

License

MIT