@aliou/pi-synthetic 0.2.0 → 0.3.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 CHANGED
@@ -33,7 +33,7 @@ src/
33
33
  ## Conventions
34
34
 
35
35
  - API key comes from environment (`SYNTHETIC_API_KEY`)
36
- - Uses Anthropic-compatible API at `https://api.synthetic.new/anthropic`
36
+ - Uses OpenAI-compatible API at `https://api.synthetic.new/openai/v1`
37
37
  - Models are hardcoded in `src/providers/models.ts`
38
38
  - Update model list when Synthetic adds new models
39
39
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @aliou/pi-synthetic
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5f67daf: Switch from Anthropic to OpenAI API endpoints
8
+
9
+ - Change API endpoint from `/anthropic` to `/openai/v1`
10
+ - Update from `anthropic-messages` to `openai-completions` API
11
+ - Add compatibility flags for proper role handling (`supportsDeveloperRole: false`)
12
+ - Use standard `max_tokens` field instead of `max_completion_tokens`
13
+
3
14
  ## 0.2.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pi Synthetic Extension
2
2
 
3
- A Pi extension that adds [Synthetic](https://synthetic.new) as a model provider, giving you access to open-source models through an Anthropic-compatible API.
3
+ A Pi extension that adds [Synthetic](https://synthetic.new) as a model provider, giving you access to open-source models through an OpenAI-compatible API.
4
4
 
5
5
  ## Installation
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliou/pi-synthetic",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/aliou/pi-synthetic"
@@ -3,9 +3,9 @@ import { SYNTHETIC_MODELS } from "./models.js";
3
3
 
4
4
  export function registerSyntheticProvider(pi: ExtensionAPI): void {
5
5
  pi.registerProvider("synthetic", {
6
- baseUrl: "https://api.synthetic.new/anthropic",
6
+ baseUrl: "https://api.synthetic.new/openai/v1",
7
7
  apiKey: "SYNTHETIC_API_KEY",
8
- api: "anthropic-messages",
8
+ api: "openai-completions",
9
9
  models: SYNTHETIC_MODELS.map((model) => ({
10
10
  id: model.id,
11
11
  name: model.name,
@@ -14,6 +14,10 @@ export function registerSyntheticProvider(pi: ExtensionAPI): void {
14
14
  cost: model.cost,
15
15
  contextWindow: model.contextWindow,
16
16
  maxTokens: model.maxTokens,
17
+ compat: {
18
+ supportsDeveloperRole: false,
19
+ maxTokensField: "max_tokens",
20
+ },
17
21
  })),
18
22
  });
19
23
  }
@@ -15,6 +15,13 @@ export interface SyntheticModelConfig {
15
15
  };
16
16
  contextWindow: number;
17
17
  maxTokens: number;
18
+ compat?: {
19
+ supportsDeveloperRole?: boolean;
20
+ supportsReasoningEffort?: boolean;
21
+ maxTokensField?: "max_completion_tokens" | "max_tokens";
22
+ requiresToolResultName?: boolean;
23
+ requiresMistralToolIds?: boolean;
24
+ };
18
25
  }
19
26
 
20
27
  export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [