@byfriends/cli 0.2.0 → 0.2.1
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/main.mjs +9 -3
- package/package.json +2 -2
package/dist/main.mjs
CHANGED
|
@@ -84842,6 +84842,7 @@ const OAuthRefSchema = z.object({
|
|
|
84842
84842
|
key: z.string().min(1)
|
|
84843
84843
|
});
|
|
84844
84844
|
const StringRecordSchema = z.record(z.string(), z.string());
|
|
84845
|
+
const ExtraBodySchema = z.record(z.string(), z.unknown());
|
|
84845
84846
|
const ProviderConfigSchema = z.object({
|
|
84846
84847
|
type: ProviderTypeSchema,
|
|
84847
84848
|
apiKey: z.string().optional(),
|
|
@@ -84850,7 +84851,8 @@ const ProviderConfigSchema = z.object({
|
|
|
84850
84851
|
thinkingEffortKey: z.string().optional(),
|
|
84851
84852
|
oauth: OAuthRefSchema.optional(),
|
|
84852
84853
|
env: StringRecordSchema.optional(),
|
|
84853
|
-
customHeaders: StringRecordSchema.optional()
|
|
84854
|
+
customHeaders: StringRecordSchema.optional(),
|
|
84855
|
+
extraBody: ExtraBodySchema.optional()
|
|
84854
84856
|
});
|
|
84855
84857
|
const ModelAliasSchema = z.object({
|
|
84856
84858
|
provider: z.string(),
|
|
@@ -104671,13 +104673,17 @@ function toKosongProviderConfig(provider, model, byfRequestHeaders, maxOutputSiz
|
|
|
104671
104673
|
...byfRequestHeaders,
|
|
104672
104674
|
...provider.customHeaders
|
|
104673
104675
|
};
|
|
104676
|
+
const generationKwargs = {
|
|
104677
|
+
prompt_cache_key: promptCacheKey,
|
|
104678
|
+
extra_body: provider.extraBody
|
|
104679
|
+
};
|
|
104674
104680
|
if (Object.keys(defaultHeaders).length === 0) return {
|
|
104675
104681
|
type: "openai-completions",
|
|
104676
104682
|
model,
|
|
104677
104683
|
baseUrl: providerValue(provider.baseUrl, provider.env, "BYF_BASE_URL"),
|
|
104678
104684
|
reasoningKey,
|
|
104679
104685
|
thinkingEffortKey: provider.thinkingEffortKey,
|
|
104680
|
-
generationKwargs
|
|
104686
|
+
generationKwargs,
|
|
104681
104687
|
apiKey: providerApiKey(provider)
|
|
104682
104688
|
};
|
|
104683
104689
|
return {
|
|
@@ -104686,7 +104692,7 @@ function toKosongProviderConfig(provider, model, byfRequestHeaders, maxOutputSiz
|
|
|
104686
104692
|
baseUrl: providerValue(provider.baseUrl, provider.env, "BYF_BASE_URL"),
|
|
104687
104693
|
reasoningKey,
|
|
104688
104694
|
thinkingEffortKey: provider.thinkingEffortKey,
|
|
104689
|
-
generationKwargs
|
|
104695
|
+
generationKwargs,
|
|
104690
104696
|
defaultHeaders,
|
|
104691
104697
|
apiKey: providerApiKey(provider)
|
|
104692
104698
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byfriends/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "BYF (Be Your Friend), an AI coding agent that runs in your terminal",
|
|
5
5
|
"license": "Proprietary",
|
|
6
6
|
"author": "ByronFinn",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"postject": "1.0.0-alpha.6",
|
|
56
56
|
"tsx": "^4.21.0",
|
|
57
57
|
"yazl": "^3.3.1",
|
|
58
|
-
"@byfriends/sdk": "^0.2.
|
|
58
|
+
"@byfriends/sdk": "^0.2.1"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22.19.0"
|