@rouvanpm/rouva 0.2.12 → 0.2.13
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 +1 -1
- package/dist/index.d.mts +14 -5
- package/dist/index.d.ts +14 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -245,7 +245,7 @@ Every turn is logged as a usage snapshot in the Rouva dashboard under the shared
|
|
|
245
245
|
| `messages` | `ChatMessage[]` | ✓ | Conversation seed — usually a single user message |
|
|
246
246
|
| `tools` | `object[]` | ✓ | Tool definitions (OpenAI or Anthropic format) |
|
|
247
247
|
| `tool_handlers` | `Record<string, string>` | ✓ | Tool name → handler URL mapping |
|
|
248
|
-
| `model` | `RouvaModel` |
|
|
248
|
+
| `model` | `RouvaModel` | ✓ | Model to use — required for all `/run` requests |
|
|
249
249
|
| `provider` | `RouvaProvider` | | Force a specific provider |
|
|
250
250
|
| `max_turns` | `number` | | Max loop iterations (default: 10) |
|
|
251
251
|
| `max_tokens` | `number` | | Max tokens per turn (default: 4096) |
|
package/dist/index.d.mts
CHANGED
|
@@ -45,7 +45,7 @@ interface ContentBlockMessage {
|
|
|
45
45
|
* valid when `tools` is set on the request.
|
|
46
46
|
*/
|
|
47
47
|
type ChatMessage = Message | AssistantToolCallMessage | ToolResultMessage | ContentBlockMessage;
|
|
48
|
-
type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral' | 'moonshot' | 'xai' | 'zai' | (string & {});
|
|
48
|
+
type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral' | 'moonshot' | 'xai' | 'zai' | 'alibaba' | (string & {});
|
|
49
49
|
/**
|
|
50
50
|
* Supported models across all providers.
|
|
51
51
|
* Omit `model` entirely to let Rouva route to the cheapest capable model automatically.
|
|
@@ -56,7 +56,7 @@ type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral'
|
|
|
56
56
|
* as-is. Until the gateway's registry knows their pricing, such requests are
|
|
57
57
|
* logged with token counts but zero cost.
|
|
58
58
|
*/
|
|
59
|
-
type RouvaModel = 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-sonnet-4-6' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-fable-5' | 'gpt-5-nano' | 'gpt-5-mini' | 'gpt-5.4-mini' | 'gpt-5' | 'gpt-5.6' | 'gpt-4.1-nano' | 'gpt-4.1-mini' | 'gpt-4.1' | 'gpt-4o' | 'gpt-4o-mini' | 'gemini-3.7-flash' | 'gemini-3.6-flash' | 'gemini-2.5-flash' | 'gemini-2.5-pro' | 'deepseek-v4-flash' | 'deepseek-v4-flash-think' | 'deepseek-v4-pro' | 'mistral-small-latest' | 'mistral-large-latest' | 'kimi-k2.6' | 'kimi-k3' | 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'glm-4.7-flash' | 'glm-5.2' | (string & {});
|
|
59
|
+
type RouvaModel = 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-sonnet-4-6' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-fable-5' | 'gpt-5-nano' | 'gpt-5-mini' | 'gpt-5.4-mini' | 'gpt-5' | 'gpt-5.6' | 'gpt-4.1-nano' | 'gpt-4.1-mini' | 'gpt-4.1' | 'gpt-4o' | 'gpt-4o-mini' | 'gemini-3.7-flash' | 'gemini-3.6-flash' | 'gemini-2.5-flash' | 'gemini-2.5-pro' | 'deepseek-v4-flash' | 'deepseek-v4-flash-think' | 'deepseek-v4-pro' | 'mistral-small-latest' | 'mistral-large-latest' | 'kimi-k2.6' | 'kimi-k3' | 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'glm-4.7-flash' | 'glm-5.2' | 'qwen-turbo' | 'qwen-plus' | 'qwen-max' | 'qwen3-30b-a3b' | 'qwen3-32b' | 'qwen3-235b-a22b' | (string & {});
|
|
60
60
|
/** Anthropic-style text block — the array form of the `system` param */
|
|
61
61
|
interface SystemTextBlock {
|
|
62
62
|
type: 'text';
|
|
@@ -176,6 +176,12 @@ interface RunParams {
|
|
|
176
176
|
* `{ type: "function", function: { name, description, parameters } }` and
|
|
177
177
|
* Anthropic-style `{ name, description, input_schema }` objects.
|
|
178
178
|
* At least one tool is required.
|
|
179
|
+
*
|
|
180
|
+
* The gateway's canonical translation layer normalizes tool schemas to the
|
|
181
|
+
* correct wire format for the selected provider on every turn — you do not
|
|
182
|
+
* need to convert between formats. Same-provider turns replay schemas
|
|
183
|
+
* verbatim, preserving vendor-specific fields like `strict` (OpenAI) or
|
|
184
|
+
* `cache_control` (Anthropic) exactly as supplied.
|
|
179
185
|
*/
|
|
180
186
|
tools: Array<Record<string, unknown>>;
|
|
181
187
|
/**
|
|
@@ -189,9 +195,12 @@ interface RunParams {
|
|
|
189
195
|
*/
|
|
190
196
|
tool_handlers: Record<string, string>;
|
|
191
197
|
/**
|
|
192
|
-
* Target model.
|
|
193
|
-
*
|
|
194
|
-
*
|
|
198
|
+
* Target model. Intelligent Routing selects a provider and model once before
|
|
199
|
+
* the loop begins — the session stays on that provider for all turns. When
|
|
200
|
+
* the session history is fully translatable, routing may cross the
|
|
201
|
+
* Anthropic ↔ OpenAI-compatible boundary; the canonical layer handles tool
|
|
202
|
+
* schema translation automatically. Omit to let Rouva select the cheapest
|
|
203
|
+
* capable model automatically.
|
|
195
204
|
*/
|
|
196
205
|
model?: RouvaModel;
|
|
197
206
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ interface ContentBlockMessage {
|
|
|
45
45
|
* valid when `tools` is set on the request.
|
|
46
46
|
*/
|
|
47
47
|
type ChatMessage = Message | AssistantToolCallMessage | ToolResultMessage | ContentBlockMessage;
|
|
48
|
-
type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral' | 'moonshot' | 'xai' | 'zai' | (string & {});
|
|
48
|
+
type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral' | 'moonshot' | 'xai' | 'zai' | 'alibaba' | (string & {});
|
|
49
49
|
/**
|
|
50
50
|
* Supported models across all providers.
|
|
51
51
|
* Omit `model` entirely to let Rouva route to the cheapest capable model automatically.
|
|
@@ -56,7 +56,7 @@ type RouvaProvider = 'anthropic' | 'openai' | 'gemini' | 'deepseek' | 'mistral'
|
|
|
56
56
|
* as-is. Until the gateway's registry knows their pricing, such requests are
|
|
57
57
|
* logged with token counts but zero cost.
|
|
58
58
|
*/
|
|
59
|
-
type RouvaModel = 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-sonnet-4-6' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-fable-5' | 'gpt-5-nano' | 'gpt-5-mini' | 'gpt-5.4-mini' | 'gpt-5' | 'gpt-5.6' | 'gpt-4.1-nano' | 'gpt-4.1-mini' | 'gpt-4.1' | 'gpt-4o' | 'gpt-4o-mini' | 'gemini-3.7-flash' | 'gemini-3.6-flash' | 'gemini-2.5-flash' | 'gemini-2.5-pro' | 'deepseek-v4-flash' | 'deepseek-v4-flash-think' | 'deepseek-v4-pro' | 'mistral-small-latest' | 'mistral-large-latest' | 'kimi-k2.6' | 'kimi-k3' | 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'glm-4.7-flash' | 'glm-5.2' | (string & {});
|
|
59
|
+
type RouvaModel = 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-sonnet-4-6' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-fable-5' | 'gpt-5-nano' | 'gpt-5-mini' | 'gpt-5.4-mini' | 'gpt-5' | 'gpt-5.6' | 'gpt-4.1-nano' | 'gpt-4.1-mini' | 'gpt-4.1' | 'gpt-4o' | 'gpt-4o-mini' | 'gemini-3.7-flash' | 'gemini-3.6-flash' | 'gemini-2.5-flash' | 'gemini-2.5-pro' | 'deepseek-v4-flash' | 'deepseek-v4-flash-think' | 'deepseek-v4-pro' | 'mistral-small-latest' | 'mistral-large-latest' | 'kimi-k2.6' | 'kimi-k3' | 'grok-4.6' | 'grok-4.5' | 'grok-4.3' | 'grok-4.20-0309-reasoning' | 'glm-4.7-flash' | 'glm-5.2' | 'qwen-turbo' | 'qwen-plus' | 'qwen-max' | 'qwen3-30b-a3b' | 'qwen3-32b' | 'qwen3-235b-a22b' | (string & {});
|
|
60
60
|
/** Anthropic-style text block — the array form of the `system` param */
|
|
61
61
|
interface SystemTextBlock {
|
|
62
62
|
type: 'text';
|
|
@@ -176,6 +176,12 @@ interface RunParams {
|
|
|
176
176
|
* `{ type: "function", function: { name, description, parameters } }` and
|
|
177
177
|
* Anthropic-style `{ name, description, input_schema }` objects.
|
|
178
178
|
* At least one tool is required.
|
|
179
|
+
*
|
|
180
|
+
* The gateway's canonical translation layer normalizes tool schemas to the
|
|
181
|
+
* correct wire format for the selected provider on every turn — you do not
|
|
182
|
+
* need to convert between formats. Same-provider turns replay schemas
|
|
183
|
+
* verbatim, preserving vendor-specific fields like `strict` (OpenAI) or
|
|
184
|
+
* `cache_control` (Anthropic) exactly as supplied.
|
|
179
185
|
*/
|
|
180
186
|
tools: Array<Record<string, unknown>>;
|
|
181
187
|
/**
|
|
@@ -189,9 +195,12 @@ interface RunParams {
|
|
|
189
195
|
*/
|
|
190
196
|
tool_handlers: Record<string, string>;
|
|
191
197
|
/**
|
|
192
|
-
* Target model.
|
|
193
|
-
*
|
|
194
|
-
*
|
|
198
|
+
* Target model. Intelligent Routing selects a provider and model once before
|
|
199
|
+
* the loop begins — the session stays on that provider for all turns. When
|
|
200
|
+
* the session history is fully translatable, routing may cross the
|
|
201
|
+
* Anthropic ↔ OpenAI-compatible boundary; the canonical layer handles tool
|
|
202
|
+
* schema translation automatically. Omit to let Rouva select the cheapest
|
|
203
|
+
* capable model automatically.
|
|
195
204
|
*/
|
|
196
205
|
model?: RouvaModel;
|
|
197
206
|
/**
|
package/package.json
CHANGED