unified-ai-router 2.4.0 → 2.4.2

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.
@@ -1,4 +1,4 @@
1
1
  vars {
2
2
  address: https://openrouter.ai/api/v1
3
- token: Bearer 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
3
+ token: Bearer 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
4
4
  }
@@ -0,0 +1,116 @@
1
+ meta {
2
+ name: tools-2
3
+ type: http
4
+ seq: 4
5
+ }
6
+
7
+ post {
8
+ url: {{address}}/chat/completions
9
+ body: json
10
+ auth: none
11
+ }
12
+
13
+ headers {
14
+ Content-Type: application/json
15
+ Authorization: {{token}}
16
+ }
17
+
18
+ body:json {
19
+ {
20
+ "model": "x-ai/grok-4-fast:free",
21
+ "messages": [
22
+ {
23
+ "role": "user",
24
+ "content": "What's the weather like in Tehran and Gaza today?"
25
+ },
26
+ {
27
+ "role": "assistant",
28
+ "content": "",
29
+ "tool_calls": [
30
+ {
31
+ "id": "call_31531384",
32
+ "function": {
33
+ "name": "get_weather",
34
+ "arguments": "{\"city\":\"Tehran\"}"
35
+ },
36
+ "index": 0,
37
+ "type": "function"
38
+ },
39
+ {
40
+ "id": "call_05244223",
41
+ "function": {
42
+ "name": "get_weather",
43
+ "arguments": "{\"city\":\"Gaza\"}"
44
+ },
45
+ "index": 1,
46
+ "type": "function"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "role": "tool",
52
+ "tool_call_id": "call_31531384",
53
+ "name": "get_weather",
54
+ "content": "{\"temperature\":25,\"condition\":\"sunny\",\"humidity\":40}"
55
+ },
56
+ {
57
+ "role": "tool",
58
+ "tool_call_id": "call_05244223",
59
+ "name": "get_weather",
60
+ "content": "{\"temperature\":28,\"condition\":\"clear\",\"humidity\":55}"
61
+ }
62
+ ],
63
+ "tools": [
64
+ {
65
+ "type": "function",
66
+ "function": {
67
+ "name": "get_weather",
68
+ "description": "Get the current weather forecast for a given city.",
69
+ "parameters": {
70
+ "type": "object",
71
+ "properties": {
72
+ "city": {
73
+ "type": "string",
74
+ "description": "The name of the city (e.g., Tehran) to get the weather for."
75
+ }
76
+ },
77
+ "required": [
78
+ "city"
79
+ ]
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "type": "function",
85
+ "function": {
86
+ "name": "multiply",
87
+ "description": "Multiply two numbers",
88
+ "parameters": {
89
+ "type": "object",
90
+ "properties": {
91
+ "a": {
92
+ "type": "number",
93
+ "description": "First number"
94
+ },
95
+ "b": {
96
+ "type": "number",
97
+ "description": "Second number"
98
+ }
99
+ },
100
+ "required": [
101
+ "a",
102
+ "b"
103
+ ]
104
+ }
105
+ }
106
+ }
107
+ ],
108
+ "tool_choice": "auto",
109
+ "stream": false,
110
+ "temperature": 0
111
+ }
112
+ }
113
+
114
+ settings {
115
+ encodeUrl: false
116
+ }
@@ -70,7 +70,7 @@ body:json {
70
70
  }
71
71
  ],
72
72
  "tool_choice": "auto",
73
- "stream": true,
73
+ "stream": false,
74
74
  "temperature":0
75
75
  }
76
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unified-ai-router",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "A unified interface for multiple LLM providers with automatic fallback, featuring an OpenAI-compatible server, tool support, and a deployable Telegram bot.",
5
5
  "license": "ISC",
6
6
  "author": "mlibre",
package/readme.md CHANGED
@@ -31,6 +31,7 @@ A unified interface for multiple LLM providers with automatic fallback. Send one
31
31
 
32
32
  ```bash
33
33
  npm i unified-ai-router
34
+ # OR
34
35
  git clone https://github.com/mlibre/AIRouter
35
36
  cd AIRouter
36
37
  npm i