@aliou/pi-synthetic 0.4.6 → 0.5.0

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/AGENTS.md DELETED
@@ -1,69 +0,0 @@
1
- # pi-synthetic
2
-
3
- Public Pi extension providing open-source language models via Synthetic's API. People could be using this, so consider backwards compatibility when making changes.
4
-
5
- Pi is pre-1.0.0, so breaking changes can happen between Pi versions. This extension must stay up to date with Pi or things will break.
6
-
7
- ## Stack
8
-
9
- - TypeScript (strict mode)
10
- - pnpm 10.26.1
11
- - Biome for linting/formatting
12
- - Changesets for versioning
13
-
14
- ## Scripts
15
-
16
- ```bash
17
- pnpm typecheck # Type check
18
- pnpm lint # Lint (runs on pre-commit)
19
- pnpm format # Format
20
- pnpm changeset # Create changeset for versioning
21
- ```
22
-
23
- ## Structure
24
-
25
- ```
26
- src/
27
- index.ts # Extension entry, registers provider
28
- providers/
29
- index.ts # Provider registration
30
- models.ts # Hardcoded model definitions
31
- ```
32
-
33
- ## Conventions
34
-
35
- - API key comes from environment (`SYNTHETIC_API_KEY`)
36
- - Uses OpenAI-compatible API at `https://api.synthetic.new/openai/v1`
37
- - Models are hardcoded in `src/providers/models.ts`
38
- - Update model list when Synthetic adds new models
39
-
40
- ## Adding Models
41
-
42
- Edit `src/providers/models.ts`:
43
-
44
- ```typescript
45
- {
46
- id: "hf:vendor/model-name",
47
- name: "vendor/model-name",
48
- reasoning: true/false,
49
- input: ["text"] or ["text", "image"],
50
- cost: {
51
- input: 0.55, // $ per million tokens
52
- output: 2.19,
53
- cacheRead: 0.55,
54
- cacheWrite: 0
55
- },
56
- contextWindow: 202752,
57
- maxTokens: 65536
58
- }
59
- ```
60
-
61
- Get pricing from `https://api.synthetic.new/openai/v1/models`.
62
-
63
- ## Versioning
64
-
65
- Uses changesets. Run `pnpm changeset` before committing user-facing changes.
66
-
67
- - `patch`: bug fixes, model updates
68
- - `minor`: new models, features
69
- - `major`: breaking changes
package/CHANGELOG.md DELETED
@@ -1,91 +0,0 @@
1
- # @aliou/pi-synthetic
2
-
3
- ## 0.4.6
4
-
5
- ### Patch Changes
6
-
7
- - 6180572: mark pi SDK peer deps as optional to prevent koffi OOM in Gondolin VMs
8
- - fe8094f: register synthetic web search tool at init time and move availability checks to hooks
9
-
10
- ## 0.4.5
11
-
12
- ### Patch Changes
13
-
14
- - 7489bc0: update model list: add nvidia/Kimi-K2.5-NVFP4, remove 6 discontinued models
15
-
16
- ## 0.4.4
17
-
18
- ### Patch Changes
19
-
20
- - 86a3145: Fix quotas command showing duplicate notification in TUI mode
21
- - f94cc6b: fix: register search tool at init time so it's available when pi collects tools
22
-
23
- ## 0.4.3
24
-
25
- ### Patch Changes
26
-
27
- - 7dc1d80: Defer subscription check to session_start for non-blocking extension init.
28
-
29
- ## 0.4.2
30
-
31
- ### Patch Changes
32
-
33
- - d9af905: Add demo video URL for the Pi package browser.
34
-
35
- ## 0.4.1
36
-
37
- ### Patch Changes
38
-
39
- - aba3bb8: fix: use correct /v2/quotas endpoint for subscription access check
40
-
41
- ## 0.4.0
42
-
43
- ### Minor Changes
44
-
45
- - 5cca252: Add `/synthetic:quotas` command to display API usage quotas
46
-
47
- A new slash command that shows your Synthetic API subscription quotas in a rich terminal UI:
48
-
49
- - Visual usage bar with color-coded severity (green/yellow/red based on usage)
50
- - Aligned columns showing limit, used, and remaining requests
51
- - ISO8601 renewal timestamp with relative time formatting (e.g., "in 5 hours")
52
- - Closes on any key press
53
-
54
- The command is only registered when `SYNTHETIC_API_KEY` environment variable is set.
55
-
56
- - a8cacfb: Add Synthetic web search tool
57
-
58
- New tool `synthetic_web_search` allows agents to search the web using Synthetic's zero-data-retention API. Returns search results with titles, URLs, content snippets, and publication dates.
59
-
60
- **Note:** Search is a subscription-only feature. The tool will only be registered if the `SYNTHETIC_API_KEY` belongs to an active subscription (verified via the usage endpoint).
61
-
62
- ## 0.3.0
63
-
64
- ### Minor Changes
65
-
66
- - 5f67daf: Switch from Anthropic to OpenAI API endpoints
67
-
68
- - Change API endpoint from `/anthropic` to `/openai/v1`
69
- - Update from `anthropic-messages` to `openai-completions` API
70
- - Add compatibility flags for proper role handling (`supportsDeveloperRole: false`)
71
- - Use standard `max_tokens` field instead of `max_completion_tokens`
72
-
73
- ## 0.2.0
74
-
75
- ### Minor Changes
76
-
77
- - 58d21ca: Fix model configurations from Synthetic API
78
-
79
- - Update maxTokens for all Synthetic models using values from models.dev (synthetic provider)
80
- - Fix Kimi-K2-Instruct-0905 reasoning flag to false
81
-
82
- ## 0.1.0
83
-
84
- ### Minor Changes
85
-
86
- - 4a32d18: Initial release with 19 open-source models
87
-
88
- - Add Synthetic provider with Anthropic-compatible API
89
- - Support for DeepSeek, Qwen, MiniMax, Kimi, Llama, GLM models
90
- - Vision and reasoning capabilities where available
91
- - Hardcoded model definitions with per-token pricing
package/biome.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": true
7
- },
8
- "files": {
9
- "includes": ["**/*.ts", "**/*.json"],
10
- "ignoreUnknown": true
11
- },
12
- "assist": {
13
- "actions": {
14
- "source": {
15
- "organizeImports": "on"
16
- }
17
- }
18
- },
19
- "linter": {
20
- "enabled": true,
21
- "rules": {
22
- "recommended": true
23
- }
24
- },
25
- "formatter": {
26
- "enabled": true,
27
- "indentStyle": "space",
28
- "indentWidth": 2
29
- }
30
- }
package/shell.nix DELETED
@@ -1,10 +0,0 @@
1
- {
2
- pkgs ? import <nixpkgs> { },
3
- }:
4
-
5
- pkgs.mkShell {
6
- buildInputs = with pkgs; [
7
- nodejs
8
- pnpm_10
9
- ];
10
- }
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "strict": true,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "resolveJsonModule": true,
11
- "noEmit": true
12
- },
13
- "include": ["src/**/*"],
14
- "exclude": ["node_modules"]
15
- }