@pinecall/skills 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinecall/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Agent Skills for the Pinecall SDK — installable into Claude Code, Antigravity, Cursor, Copilot and any agent that supports the open Skills format.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,6 +67,34 @@ curl https://playground.pinecall.io/api/rates/models
|
|
|
67
67
|
|
|
68
68
|
`managed: true` → usable with no key. `managed: false` → add your own key.
|
|
69
69
|
|
|
70
|
+
## Check a user's access to a model (SDK / API)
|
|
71
|
+
|
|
72
|
+
Before configuring an agent, check whether the org can actually use a model —
|
|
73
|
+
it combines all three gates (model exists · allowed on the org's plan · managed
|
|
74
|
+
or BYOK-key-present):
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { fetchModelAccess, hasModelAccess, fetchModelCatalog } from "@pinecall/sdk";
|
|
78
|
+
|
|
79
|
+
const a = await fetchModelAccess({ service: "tts", model: "eleven_multilingual_v2" });
|
|
80
|
+
// { allowed, reason, provider, managed, planAllowed, hasKey, requiresKey }
|
|
81
|
+
|
|
82
|
+
if (!(await hasModelAccess({ service: "llm", model: "grok-4" }))) {
|
|
83
|
+
// reason: "byok_key_required" → tell the user to add their xAI key
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const all = await fetchModelCatalog(); // access for every priced model
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Reads `PINECALL_API_KEY` (override with `apiKey`). Raw endpoint:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
curl "https://playground.pinecall.io/api/models/access?service=tts&model=eleven_multilingual_v2" \
|
|
93
|
+
-H "Authorization: Bearer pk_…"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`reason` is one of `ok` · `unknown_model` · `plan_restricted` · `byok_key_required`.
|
|
97
|
+
|
|
70
98
|
## BYOK enforcement
|
|
71
99
|
|
|
72
100
|
If you configure a BYOK-only provider and your org has **not** saved a key for it,
|
|
@@ -79,6 +107,20 @@ key for 'xai' — add your key under Provider Keys in the dashboard, then reconn
|
|
|
79
107
|
|
|
80
108
|
Pinecall never silently falls back to its own key for a BYOK provider.
|
|
81
109
|
|
|
110
|
+
## Plan limits & model allow-list
|
|
111
|
+
|
|
112
|
+
Two more gates are enforced at agent registration, both rejecting with
|
|
113
|
+
`MODEL_NOT_ALLOWED`:
|
|
114
|
+
|
|
115
|
+
1. **Must be a priced model in the DB.** Any STT/TTS/LLM model you declare must exist
|
|
116
|
+
in the rate table (be a known, priced model) — unknown models are rejected.
|
|
117
|
+
2. **Must be allowed on your plan.** Plans can restrict which models a tier may use.
|
|
118
|
+
For example, the **free tier can use ElevenLabs flash + multilingual, but not the
|
|
119
|
+
pricier models** (and Cartesia/Polly in full). Paid plans allow everything priced.
|
|
120
|
+
|
|
121
|
+
Use the access check above (`fetchModelAccess` / `GET /api/models/access`) to see the
|
|
122
|
+
verdict and `reason` (`plan_restricted`, `unknown_model`, …) before connecting.
|
|
123
|
+
|
|
82
124
|
## Add your own key
|
|
83
125
|
|
|
84
126
|
- **Dashboard** → **Provider Keys** → pick the provider, paste the key.
|