@pinecall/skills 0.1.10 → 0.1.11
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.11",
|
|
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,
|