@mariozechner/pi-ai 0.58.1 → 0.58.3
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/README.md +23 -0
- package/dist/models.generated.d.ts +35 -1
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +39 -5
- package/dist/models.generated.js.map +1 -1
- package/dist/utils/oauth/anthropic.d.ts.map +1 -1
- package/dist/utils/oauth/anthropic.js +1 -6
- package/dist/utils/oauth/anthropic.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -729,6 +729,29 @@ const response = await stream(ollamaModel, context, {
|
|
|
729
729
|
});
|
|
730
730
|
```
|
|
731
731
|
|
|
732
|
+
Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so the system prompt is sent as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
|
|
733
|
+
|
|
734
|
+
This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers. You can set `compat` at the provider level or per model.
|
|
735
|
+
|
|
736
|
+
```typescript
|
|
737
|
+
const ollamaReasoningModel: Model<'openai-completions'> = {
|
|
738
|
+
id: 'gpt-oss:20b',
|
|
739
|
+
name: 'GPT-OSS 20B (Ollama)',
|
|
740
|
+
api: 'openai-completions',
|
|
741
|
+
provider: 'ollama',
|
|
742
|
+
baseUrl: 'http://localhost:11434/v1',
|
|
743
|
+
reasoning: true,
|
|
744
|
+
input: ['text'],
|
|
745
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
746
|
+
contextWindow: 131072,
|
|
747
|
+
maxTokens: 32000,
|
|
748
|
+
compat: {
|
|
749
|
+
supportsDeveloperRole: false,
|
|
750
|
+
supportsReasoningEffort: false,
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
```
|
|
754
|
+
|
|
732
755
|
### OpenAI Compatibility Settings
|
|
733
756
|
|
|
734
757
|
The `openai-completions` API is implemented by many providers with minor differences. By default, the library auto-detects compatibility settings based on `baseUrl` for a small set of known OpenAI-compatible providers (Cerebras, xAI, Chutes, DeepSeek, zAi, OpenCode, etc.). For custom proxies or unknown endpoints, you can override these settings via the `compat` field. For `openai-responses` models, the compat field only supports Responses-specific flags.
|
|
@@ -7847,6 +7847,23 @@ export declare const MODELS: {
|
|
|
7847
7847
|
contextWindow: number;
|
|
7848
7848
|
maxTokens: number;
|
|
7849
7849
|
};
|
|
7850
|
+
readonly "minimax/minimax-m2.5:free": {
|
|
7851
|
+
id: string;
|
|
7852
|
+
name: string;
|
|
7853
|
+
api: "openai-completions";
|
|
7854
|
+
provider: string;
|
|
7855
|
+
baseUrl: string;
|
|
7856
|
+
reasoning: true;
|
|
7857
|
+
input: "text"[];
|
|
7858
|
+
cost: {
|
|
7859
|
+
input: number;
|
|
7860
|
+
output: number;
|
|
7861
|
+
cacheRead: number;
|
|
7862
|
+
cacheWrite: number;
|
|
7863
|
+
};
|
|
7864
|
+
contextWindow: number;
|
|
7865
|
+
maxTokens: number;
|
|
7866
|
+
};
|
|
7850
7867
|
readonly "mistralai/codestral-2508": {
|
|
7851
7868
|
id: string;
|
|
7852
7869
|
name: string;
|
|
@@ -9418,7 +9435,7 @@ export declare const MODELS: {
|
|
|
9418
9435
|
provider: string;
|
|
9419
9436
|
baseUrl: string;
|
|
9420
9437
|
reasoning: true;
|
|
9421
|
-
input: "text"[];
|
|
9438
|
+
input: ("image" | "text")[];
|
|
9422
9439
|
cost: {
|
|
9423
9440
|
input: number;
|
|
9424
9441
|
output: number;
|
|
@@ -10686,6 +10703,23 @@ export declare const MODELS: {
|
|
|
10686
10703
|
contextWindow: number;
|
|
10687
10704
|
maxTokens: number;
|
|
10688
10705
|
};
|
|
10706
|
+
readonly "z-ai/glm-5-turbo": {
|
|
10707
|
+
id: string;
|
|
10708
|
+
name: string;
|
|
10709
|
+
api: "openai-completions";
|
|
10710
|
+
provider: string;
|
|
10711
|
+
baseUrl: string;
|
|
10712
|
+
reasoning: true;
|
|
10713
|
+
input: "text"[];
|
|
10714
|
+
cost: {
|
|
10715
|
+
input: number;
|
|
10716
|
+
output: number;
|
|
10717
|
+
cacheRead: number;
|
|
10718
|
+
cacheWrite: number;
|
|
10719
|
+
};
|
|
10720
|
+
contextWindow: number;
|
|
10721
|
+
maxTokens: number;
|
|
10722
|
+
};
|
|
10689
10723
|
};
|
|
10690
10724
|
readonly "vercel-ai-gateway": {
|
|
10691
10725
|
readonly "alibaba/qwen-3-14b": {
|