@blockrun/llm 4.4.0 → 4.5.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/README.md +61 -40
- package/dist/index.cjs +486 -281
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +486 -281
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1633,7 +1633,7 @@ declare class LLMClient {
|
|
|
1633
1633
|
/**
|
|
1634
1634
|
* Simple 1-line chat interface.
|
|
1635
1635
|
*
|
|
1636
|
-
* @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-
|
|
1636
|
+
* @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
|
|
1637
1637
|
* @param prompt - User message
|
|
1638
1638
|
* @param options - Optional chat parameters
|
|
1639
1639
|
* @returns Assistant's response text
|
|
@@ -1666,9 +1666,9 @@ declare class LLMClient {
|
|
|
1666
1666
|
* ```ts
|
|
1667
1667
|
* const result = await client.smartChat('What is 2+2?');
|
|
1668
1668
|
* console.log(result.response); // '4'
|
|
1669
|
-
* console.log(result.model); // 'google/gemini-3.
|
|
1669
|
+
* console.log(result.model); // 'google/gemini-3.6-flash'
|
|
1670
1670
|
* console.log(result.routing.method); // 'portfolio'
|
|
1671
|
-
* console.log(result.routing.savings); // 0.
|
|
1671
|
+
* console.log(result.routing.savings); // 0.84 (84% savings)
|
|
1672
1672
|
* ```
|
|
1673
1673
|
*
|
|
1674
1674
|
* @example With routing profile
|
|
@@ -2830,7 +2830,7 @@ declare class BlockrunClient {
|
|
|
2830
2830
|
*
|
|
2831
2831
|
* Example — streaming chat:
|
|
2832
2832
|
* for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
|
|
2833
|
-
* model: "anthropic/claude-sonnet-
|
|
2833
|
+
* model: "anthropic/claude-sonnet-5.5",
|
|
2834
2834
|
* messages: [{ role: "user", content: "Hi" }],
|
|
2835
2835
|
* stream: true,
|
|
2836
2836
|
* })) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1633,7 +1633,7 @@ declare class LLMClient {
|
|
|
1633
1633
|
/**
|
|
1634
1634
|
* Simple 1-line chat interface.
|
|
1635
1635
|
*
|
|
1636
|
-
* @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-
|
|
1636
|
+
* @param model - Model ID (e.g., 'openai/gpt-5.2', 'anthropic/claude-sonnet-5.5')
|
|
1637
1637
|
* @param prompt - User message
|
|
1638
1638
|
* @param options - Optional chat parameters
|
|
1639
1639
|
* @returns Assistant's response text
|
|
@@ -1666,9 +1666,9 @@ declare class LLMClient {
|
|
|
1666
1666
|
* ```ts
|
|
1667
1667
|
* const result = await client.smartChat('What is 2+2?');
|
|
1668
1668
|
* console.log(result.response); // '4'
|
|
1669
|
-
* console.log(result.model); // 'google/gemini-3.
|
|
1669
|
+
* console.log(result.model); // 'google/gemini-3.6-flash'
|
|
1670
1670
|
* console.log(result.routing.method); // 'portfolio'
|
|
1671
|
-
* console.log(result.routing.savings); // 0.
|
|
1671
|
+
* console.log(result.routing.savings); // 0.84 (84% savings)
|
|
1672
1672
|
* ```
|
|
1673
1673
|
*
|
|
1674
1674
|
* @example With routing profile
|
|
@@ -2830,7 +2830,7 @@ declare class BlockrunClient {
|
|
|
2830
2830
|
*
|
|
2831
2831
|
* Example — streaming chat:
|
|
2832
2832
|
* for await (const chunk of br.stream<ChatChunk>("/v1/chat/completions", {
|
|
2833
|
-
* model: "anthropic/claude-sonnet-
|
|
2833
|
+
* model: "anthropic/claude-sonnet-5.5",
|
|
2834
2834
|
* messages: [{ role: "user", content: "Hi" }],
|
|
2835
2835
|
* stream: true,
|
|
2836
2836
|
* })) {
|