@mariozechner/pi-ai 0.40.1 → 0.42.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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -0
- package/dist/cli.js.map +1 -1
- package/dist/models.generated.d.ts +444 -0
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +444 -0
- package/dist/models.generated.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +6 -3
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +1 -0
- package/dist/stream.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/oauth/anthropic.d.ts +16 -0
- package/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/dist/utils/oauth/anthropic.js +91 -0
- package/dist/utils/oauth/anthropic.js.map +1 -0
- package/dist/utils/oauth/index.d.ts +1 -0
- package/dist/utils/oauth/index.d.ts.map +1 -1
- package/dist/utils/oauth/index.js +11 -0
- package/dist/utils/oauth/index.js.map +1 -1
- package/dist/utils/oauth/types.d.ts +1 -1
- package/dist/utils/oauth/types.d.ts.map +1 -1
- package/dist/utils/oauth/types.js.map +1 -1
- package/package.json +1 -1
package/dist/models.generated.js
CHANGED
|
@@ -2874,6 +2874,450 @@ export const MODELS = {
|
|
|
2874
2874
|
maxTokens: 128000,
|
|
2875
2875
|
},
|
|
2876
2876
|
},
|
|
2877
|
+
"opencode": {
|
|
2878
|
+
"alpha-gd4": {
|
|
2879
|
+
id: "alpha-gd4",
|
|
2880
|
+
name: "Alpha GD4",
|
|
2881
|
+
api: "anthropic-messages",
|
|
2882
|
+
provider: "opencode",
|
|
2883
|
+
baseUrl: "https://opencode.ai/zen",
|
|
2884
|
+
reasoning: true,
|
|
2885
|
+
input: ["text"],
|
|
2886
|
+
cost: {
|
|
2887
|
+
input: 0.5,
|
|
2888
|
+
output: 2,
|
|
2889
|
+
cacheRead: 0.15,
|
|
2890
|
+
cacheWrite: 0,
|
|
2891
|
+
},
|
|
2892
|
+
contextWindow: 262144,
|
|
2893
|
+
maxTokens: 32768,
|
|
2894
|
+
},
|
|
2895
|
+
"alpha-glm-4.7": {
|
|
2896
|
+
id: "alpha-glm-4.7",
|
|
2897
|
+
name: "Alpha GLM-4.7",
|
|
2898
|
+
api: "openai-completions",
|
|
2899
|
+
provider: "opencode",
|
|
2900
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
2901
|
+
reasoning: true,
|
|
2902
|
+
input: ["text"],
|
|
2903
|
+
cost: {
|
|
2904
|
+
input: 0.6,
|
|
2905
|
+
output: 2.2,
|
|
2906
|
+
cacheRead: 0.6,
|
|
2907
|
+
cacheWrite: 0,
|
|
2908
|
+
},
|
|
2909
|
+
contextWindow: 204800,
|
|
2910
|
+
maxTokens: 131072,
|
|
2911
|
+
},
|
|
2912
|
+
"big-pickle": {
|
|
2913
|
+
id: "big-pickle",
|
|
2914
|
+
name: "Big Pickle",
|
|
2915
|
+
api: "openai-completions",
|
|
2916
|
+
provider: "opencode",
|
|
2917
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
2918
|
+
reasoning: true,
|
|
2919
|
+
input: ["text"],
|
|
2920
|
+
cost: {
|
|
2921
|
+
input: 0,
|
|
2922
|
+
output: 0,
|
|
2923
|
+
cacheRead: 0,
|
|
2924
|
+
cacheWrite: 0,
|
|
2925
|
+
},
|
|
2926
|
+
contextWindow: 200000,
|
|
2927
|
+
maxTokens: 128000,
|
|
2928
|
+
},
|
|
2929
|
+
"claude-3-5-haiku": {
|
|
2930
|
+
id: "claude-3-5-haiku",
|
|
2931
|
+
name: "Claude Haiku 3.5",
|
|
2932
|
+
api: "anthropic-messages",
|
|
2933
|
+
provider: "opencode",
|
|
2934
|
+
baseUrl: "https://opencode.ai/zen",
|
|
2935
|
+
reasoning: false,
|
|
2936
|
+
input: ["text", "image"],
|
|
2937
|
+
cost: {
|
|
2938
|
+
input: 0.8,
|
|
2939
|
+
output: 4,
|
|
2940
|
+
cacheRead: 0.08,
|
|
2941
|
+
cacheWrite: 1,
|
|
2942
|
+
},
|
|
2943
|
+
contextWindow: 200000,
|
|
2944
|
+
maxTokens: 8192,
|
|
2945
|
+
},
|
|
2946
|
+
"claude-haiku-4-5": {
|
|
2947
|
+
id: "claude-haiku-4-5",
|
|
2948
|
+
name: "Claude Haiku 4.5",
|
|
2949
|
+
api: "anthropic-messages",
|
|
2950
|
+
provider: "opencode",
|
|
2951
|
+
baseUrl: "https://opencode.ai/zen",
|
|
2952
|
+
reasoning: true,
|
|
2953
|
+
input: ["text", "image"],
|
|
2954
|
+
cost: {
|
|
2955
|
+
input: 1,
|
|
2956
|
+
output: 5,
|
|
2957
|
+
cacheRead: 0.1,
|
|
2958
|
+
cacheWrite: 1.25,
|
|
2959
|
+
},
|
|
2960
|
+
contextWindow: 200000,
|
|
2961
|
+
maxTokens: 64000,
|
|
2962
|
+
},
|
|
2963
|
+
"claude-opus-4-1": {
|
|
2964
|
+
id: "claude-opus-4-1",
|
|
2965
|
+
name: "Claude Opus 4.1",
|
|
2966
|
+
api: "anthropic-messages",
|
|
2967
|
+
provider: "opencode",
|
|
2968
|
+
baseUrl: "https://opencode.ai/zen",
|
|
2969
|
+
reasoning: true,
|
|
2970
|
+
input: ["text", "image"],
|
|
2971
|
+
cost: {
|
|
2972
|
+
input: 15,
|
|
2973
|
+
output: 75,
|
|
2974
|
+
cacheRead: 1.5,
|
|
2975
|
+
cacheWrite: 18.75,
|
|
2976
|
+
},
|
|
2977
|
+
contextWindow: 200000,
|
|
2978
|
+
maxTokens: 32000,
|
|
2979
|
+
},
|
|
2980
|
+
"claude-opus-4-5": {
|
|
2981
|
+
id: "claude-opus-4-5",
|
|
2982
|
+
name: "Claude Opus 4.5",
|
|
2983
|
+
api: "anthropic-messages",
|
|
2984
|
+
provider: "opencode",
|
|
2985
|
+
baseUrl: "https://opencode.ai/zen",
|
|
2986
|
+
reasoning: true,
|
|
2987
|
+
input: ["text", "image"],
|
|
2988
|
+
cost: {
|
|
2989
|
+
input: 5,
|
|
2990
|
+
output: 25,
|
|
2991
|
+
cacheRead: 0.5,
|
|
2992
|
+
cacheWrite: 6.25,
|
|
2993
|
+
},
|
|
2994
|
+
contextWindow: 200000,
|
|
2995
|
+
maxTokens: 64000,
|
|
2996
|
+
},
|
|
2997
|
+
"claude-sonnet-4": {
|
|
2998
|
+
id: "claude-sonnet-4",
|
|
2999
|
+
name: "Claude Sonnet 4",
|
|
3000
|
+
api: "anthropic-messages",
|
|
3001
|
+
provider: "opencode",
|
|
3002
|
+
baseUrl: "https://opencode.ai/zen",
|
|
3003
|
+
reasoning: true,
|
|
3004
|
+
input: ["text", "image"],
|
|
3005
|
+
cost: {
|
|
3006
|
+
input: 3,
|
|
3007
|
+
output: 15,
|
|
3008
|
+
cacheRead: 0.3,
|
|
3009
|
+
cacheWrite: 3.75,
|
|
3010
|
+
},
|
|
3011
|
+
contextWindow: 1000000,
|
|
3012
|
+
maxTokens: 64000,
|
|
3013
|
+
},
|
|
3014
|
+
"claude-sonnet-4-5": {
|
|
3015
|
+
id: "claude-sonnet-4-5",
|
|
3016
|
+
name: "Claude Sonnet 4.5",
|
|
3017
|
+
api: "anthropic-messages",
|
|
3018
|
+
provider: "opencode",
|
|
3019
|
+
baseUrl: "https://opencode.ai/zen",
|
|
3020
|
+
reasoning: true,
|
|
3021
|
+
input: ["text", "image"],
|
|
3022
|
+
cost: {
|
|
3023
|
+
input: 3,
|
|
3024
|
+
output: 15,
|
|
3025
|
+
cacheRead: 0.3,
|
|
3026
|
+
cacheWrite: 3.75,
|
|
3027
|
+
},
|
|
3028
|
+
contextWindow: 1000000,
|
|
3029
|
+
maxTokens: 64000,
|
|
3030
|
+
},
|
|
3031
|
+
"gemini-3-flash": {
|
|
3032
|
+
id: "gemini-3-flash",
|
|
3033
|
+
name: "Gemini 3 Flash",
|
|
3034
|
+
api: "google-generative-ai",
|
|
3035
|
+
provider: "opencode",
|
|
3036
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3037
|
+
reasoning: true,
|
|
3038
|
+
input: ["text", "image"],
|
|
3039
|
+
cost: {
|
|
3040
|
+
input: 0.5,
|
|
3041
|
+
output: 3,
|
|
3042
|
+
cacheRead: 0.05,
|
|
3043
|
+
cacheWrite: 0,
|
|
3044
|
+
},
|
|
3045
|
+
contextWindow: 1048576,
|
|
3046
|
+
maxTokens: 65536,
|
|
3047
|
+
},
|
|
3048
|
+
"gemini-3-pro": {
|
|
3049
|
+
id: "gemini-3-pro",
|
|
3050
|
+
name: "Gemini 3 Pro",
|
|
3051
|
+
api: "google-generative-ai",
|
|
3052
|
+
provider: "opencode",
|
|
3053
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3054
|
+
reasoning: true,
|
|
3055
|
+
input: ["text", "image"],
|
|
3056
|
+
cost: {
|
|
3057
|
+
input: 2,
|
|
3058
|
+
output: 12,
|
|
3059
|
+
cacheRead: 0.2,
|
|
3060
|
+
cacheWrite: 0,
|
|
3061
|
+
},
|
|
3062
|
+
contextWindow: 1048576,
|
|
3063
|
+
maxTokens: 65536,
|
|
3064
|
+
},
|
|
3065
|
+
"glm-4.6": {
|
|
3066
|
+
id: "glm-4.6",
|
|
3067
|
+
name: "GLM-4.6",
|
|
3068
|
+
api: "openai-completions",
|
|
3069
|
+
provider: "opencode",
|
|
3070
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3071
|
+
reasoning: true,
|
|
3072
|
+
input: ["text"],
|
|
3073
|
+
cost: {
|
|
3074
|
+
input: 0.6,
|
|
3075
|
+
output: 2.2,
|
|
3076
|
+
cacheRead: 0.1,
|
|
3077
|
+
cacheWrite: 0,
|
|
3078
|
+
},
|
|
3079
|
+
contextWindow: 204800,
|
|
3080
|
+
maxTokens: 131072,
|
|
3081
|
+
},
|
|
3082
|
+
"glm-4.7-free": {
|
|
3083
|
+
id: "glm-4.7-free",
|
|
3084
|
+
name: "GLM-4.7",
|
|
3085
|
+
api: "openai-completions",
|
|
3086
|
+
provider: "opencode",
|
|
3087
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3088
|
+
reasoning: true,
|
|
3089
|
+
input: ["text"],
|
|
3090
|
+
cost: {
|
|
3091
|
+
input: 0,
|
|
3092
|
+
output: 0,
|
|
3093
|
+
cacheRead: 0,
|
|
3094
|
+
cacheWrite: 0,
|
|
3095
|
+
},
|
|
3096
|
+
contextWindow: 204800,
|
|
3097
|
+
maxTokens: 131072,
|
|
3098
|
+
},
|
|
3099
|
+
"gpt-5": {
|
|
3100
|
+
id: "gpt-5",
|
|
3101
|
+
name: "GPT-5",
|
|
3102
|
+
api: "openai-responses",
|
|
3103
|
+
provider: "opencode",
|
|
3104
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3105
|
+
reasoning: true,
|
|
3106
|
+
input: ["text", "image"],
|
|
3107
|
+
cost: {
|
|
3108
|
+
input: 1.07,
|
|
3109
|
+
output: 8.5,
|
|
3110
|
+
cacheRead: 0.107,
|
|
3111
|
+
cacheWrite: 0,
|
|
3112
|
+
},
|
|
3113
|
+
contextWindow: 400000,
|
|
3114
|
+
maxTokens: 128000,
|
|
3115
|
+
},
|
|
3116
|
+
"gpt-5-codex": {
|
|
3117
|
+
id: "gpt-5-codex",
|
|
3118
|
+
name: "GPT-5 Codex",
|
|
3119
|
+
api: "openai-responses",
|
|
3120
|
+
provider: "opencode",
|
|
3121
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3122
|
+
reasoning: true,
|
|
3123
|
+
input: ["text", "image"],
|
|
3124
|
+
cost: {
|
|
3125
|
+
input: 1.07,
|
|
3126
|
+
output: 8.5,
|
|
3127
|
+
cacheRead: 0.107,
|
|
3128
|
+
cacheWrite: 0,
|
|
3129
|
+
},
|
|
3130
|
+
contextWindow: 400000,
|
|
3131
|
+
maxTokens: 128000,
|
|
3132
|
+
},
|
|
3133
|
+
"gpt-5-nano": {
|
|
3134
|
+
id: "gpt-5-nano",
|
|
3135
|
+
name: "GPT-5 Nano",
|
|
3136
|
+
api: "openai-responses",
|
|
3137
|
+
provider: "opencode",
|
|
3138
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3139
|
+
reasoning: true,
|
|
3140
|
+
input: ["text", "image"],
|
|
3141
|
+
cost: {
|
|
3142
|
+
input: 0,
|
|
3143
|
+
output: 0,
|
|
3144
|
+
cacheRead: 0,
|
|
3145
|
+
cacheWrite: 0,
|
|
3146
|
+
},
|
|
3147
|
+
contextWindow: 400000,
|
|
3148
|
+
maxTokens: 128000,
|
|
3149
|
+
},
|
|
3150
|
+
"gpt-5.1": {
|
|
3151
|
+
id: "gpt-5.1",
|
|
3152
|
+
name: "GPT-5.1",
|
|
3153
|
+
api: "openai-responses",
|
|
3154
|
+
provider: "opencode",
|
|
3155
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3156
|
+
reasoning: true,
|
|
3157
|
+
input: ["text", "image"],
|
|
3158
|
+
cost: {
|
|
3159
|
+
input: 1.07,
|
|
3160
|
+
output: 8.5,
|
|
3161
|
+
cacheRead: 0.107,
|
|
3162
|
+
cacheWrite: 0,
|
|
3163
|
+
},
|
|
3164
|
+
contextWindow: 400000,
|
|
3165
|
+
maxTokens: 128000,
|
|
3166
|
+
},
|
|
3167
|
+
"gpt-5.1-codex": {
|
|
3168
|
+
id: "gpt-5.1-codex",
|
|
3169
|
+
name: "GPT-5.1 Codex",
|
|
3170
|
+
api: "openai-responses",
|
|
3171
|
+
provider: "opencode",
|
|
3172
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3173
|
+
reasoning: true,
|
|
3174
|
+
input: ["text", "image"],
|
|
3175
|
+
cost: {
|
|
3176
|
+
input: 1.07,
|
|
3177
|
+
output: 8.5,
|
|
3178
|
+
cacheRead: 0.107,
|
|
3179
|
+
cacheWrite: 0,
|
|
3180
|
+
},
|
|
3181
|
+
contextWindow: 400000,
|
|
3182
|
+
maxTokens: 128000,
|
|
3183
|
+
},
|
|
3184
|
+
"gpt-5.1-codex-max": {
|
|
3185
|
+
id: "gpt-5.1-codex-max",
|
|
3186
|
+
name: "GPT-5.1 Codex Max",
|
|
3187
|
+
api: "openai-responses",
|
|
3188
|
+
provider: "opencode",
|
|
3189
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3190
|
+
reasoning: true,
|
|
3191
|
+
input: ["text", "image"],
|
|
3192
|
+
cost: {
|
|
3193
|
+
input: 1.25,
|
|
3194
|
+
output: 10,
|
|
3195
|
+
cacheRead: 0.125,
|
|
3196
|
+
cacheWrite: 0,
|
|
3197
|
+
},
|
|
3198
|
+
contextWindow: 400000,
|
|
3199
|
+
maxTokens: 128000,
|
|
3200
|
+
},
|
|
3201
|
+
"gpt-5.1-codex-mini": {
|
|
3202
|
+
id: "gpt-5.1-codex-mini",
|
|
3203
|
+
name: "GPT-5.1 Codex Mini",
|
|
3204
|
+
api: "openai-responses",
|
|
3205
|
+
provider: "opencode",
|
|
3206
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3207
|
+
reasoning: true,
|
|
3208
|
+
input: ["text", "image"],
|
|
3209
|
+
cost: {
|
|
3210
|
+
input: 0.25,
|
|
3211
|
+
output: 2,
|
|
3212
|
+
cacheRead: 0.025,
|
|
3213
|
+
cacheWrite: 0,
|
|
3214
|
+
},
|
|
3215
|
+
contextWindow: 400000,
|
|
3216
|
+
maxTokens: 128000,
|
|
3217
|
+
},
|
|
3218
|
+
"gpt-5.2": {
|
|
3219
|
+
id: "gpt-5.2",
|
|
3220
|
+
name: "GPT-5.2",
|
|
3221
|
+
api: "openai-responses",
|
|
3222
|
+
provider: "opencode",
|
|
3223
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3224
|
+
reasoning: true,
|
|
3225
|
+
input: ["text", "image"],
|
|
3226
|
+
cost: {
|
|
3227
|
+
input: 1.75,
|
|
3228
|
+
output: 14,
|
|
3229
|
+
cacheRead: 0.175,
|
|
3230
|
+
cacheWrite: 0,
|
|
3231
|
+
},
|
|
3232
|
+
contextWindow: 400000,
|
|
3233
|
+
maxTokens: 128000,
|
|
3234
|
+
},
|
|
3235
|
+
"grok-code": {
|
|
3236
|
+
id: "grok-code",
|
|
3237
|
+
name: "Grok Code Fast 1",
|
|
3238
|
+
api: "openai-completions",
|
|
3239
|
+
provider: "opencode",
|
|
3240
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3241
|
+
reasoning: true,
|
|
3242
|
+
input: ["text"],
|
|
3243
|
+
cost: {
|
|
3244
|
+
input: 0,
|
|
3245
|
+
output: 0,
|
|
3246
|
+
cacheRead: 0,
|
|
3247
|
+
cacheWrite: 0,
|
|
3248
|
+
},
|
|
3249
|
+
contextWindow: 256000,
|
|
3250
|
+
maxTokens: 256000,
|
|
3251
|
+
},
|
|
3252
|
+
"kimi-k2": {
|
|
3253
|
+
id: "kimi-k2",
|
|
3254
|
+
name: "Kimi K2",
|
|
3255
|
+
api: "openai-completions",
|
|
3256
|
+
provider: "opencode",
|
|
3257
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3258
|
+
reasoning: false,
|
|
3259
|
+
input: ["text"],
|
|
3260
|
+
cost: {
|
|
3261
|
+
input: 0.4,
|
|
3262
|
+
output: 2.5,
|
|
3263
|
+
cacheRead: 0.4,
|
|
3264
|
+
cacheWrite: 0,
|
|
3265
|
+
},
|
|
3266
|
+
contextWindow: 262144,
|
|
3267
|
+
maxTokens: 262144,
|
|
3268
|
+
},
|
|
3269
|
+
"kimi-k2-thinking": {
|
|
3270
|
+
id: "kimi-k2-thinking",
|
|
3271
|
+
name: "Kimi K2 Thinking",
|
|
3272
|
+
api: "openai-completions",
|
|
3273
|
+
provider: "opencode",
|
|
3274
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3275
|
+
reasoning: true,
|
|
3276
|
+
input: ["text"],
|
|
3277
|
+
cost: {
|
|
3278
|
+
input: 0.4,
|
|
3279
|
+
output: 2.5,
|
|
3280
|
+
cacheRead: 0.4,
|
|
3281
|
+
cacheWrite: 0,
|
|
3282
|
+
},
|
|
3283
|
+
contextWindow: 262144,
|
|
3284
|
+
maxTokens: 262144,
|
|
3285
|
+
},
|
|
3286
|
+
"minimax-m2.1-free": {
|
|
3287
|
+
id: "minimax-m2.1-free",
|
|
3288
|
+
name: "MiniMax M2.1",
|
|
3289
|
+
api: "anthropic-messages",
|
|
3290
|
+
provider: "opencode",
|
|
3291
|
+
baseUrl: "https://opencode.ai/zen",
|
|
3292
|
+
reasoning: true,
|
|
3293
|
+
input: ["text"],
|
|
3294
|
+
cost: {
|
|
3295
|
+
input: 0,
|
|
3296
|
+
output: 0,
|
|
3297
|
+
cacheRead: 0,
|
|
3298
|
+
cacheWrite: 0,
|
|
3299
|
+
},
|
|
3300
|
+
contextWindow: 204800,
|
|
3301
|
+
maxTokens: 131072,
|
|
3302
|
+
},
|
|
3303
|
+
"qwen3-coder": {
|
|
3304
|
+
id: "qwen3-coder",
|
|
3305
|
+
name: "Qwen3 Coder",
|
|
3306
|
+
api: "openai-completions",
|
|
3307
|
+
provider: "opencode",
|
|
3308
|
+
baseUrl: "https://opencode.ai/zen/v1",
|
|
3309
|
+
reasoning: false,
|
|
3310
|
+
input: ["text"],
|
|
3311
|
+
cost: {
|
|
3312
|
+
input: 0.45,
|
|
3313
|
+
output: 1.8,
|
|
3314
|
+
cacheRead: 0,
|
|
3315
|
+
cacheWrite: 0,
|
|
3316
|
+
},
|
|
3317
|
+
contextWindow: 262144,
|
|
3318
|
+
maxTokens: 65536,
|
|
3319
|
+
},
|
|
3320
|
+
},
|
|
2877
3321
|
"openrouter": {
|
|
2878
3322
|
"ai21/jamba-large-1.7": {
|
|
2879
3323
|
id: "ai21/jamba-large-1.7",
|