@rouvanpm/rouva 0.4.0 → 0.4.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 +3 -1
- package/dist/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,8 +105,10 @@ const res = await rouva.chat.completions.create({
|
|
|
105
105
|
- **`metadata`** — up to 10 string key-value pairs (keys up to 64 characters, values up to 256, no null bytes) stored with the request's usage record; not sent to the provider.
|
|
106
106
|
- **`seed`** — best-effort deterministic sampling. Only OpenAI honors it, so it requires an OpenAI `model` and pins the request to that exact model (no routing, no fallbacks).
|
|
107
107
|
- **`response_format`** — JSON mode or a JSON schema; see [Structured output](#structured-output).
|
|
108
|
+
- **`reasoning_effort`** — `'none'` … `'xhigh'`, or `'max'` for Claude. Which values a model takes depends on the model; routing only picks one that takes yours; a listed OpenAI or Claude model you name that doesn't gets a 400, and other providers' models get the value as sent. On gpt-6-luna / gpt-6-sol, `'none'` turns reasoning off. See [the docs](https://rouva.io/docs#reasoning-effort).
|
|
109
|
+
- **`parallel_tool_calls`** — with `tools`: `false` allows at most one tool call per turn (Claude included).
|
|
108
110
|
|
|
109
|
-
Unsupported OpenAI options (`logit_bias`, `logprobs`, `
|
|
111
|
+
Unsupported OpenAI options (`logit_bias`, `logprobs`, `n > 1`, the legacy `functions`/`function_call` fields, …) are rejected by the gateway with an explicit 400 rather than silently ignored.
|
|
110
112
|
|
|
111
113
|
## Unlisted models
|
|
112
114
|
|
package/dist/index.d.mts
CHANGED
|
@@ -143,6 +143,26 @@ interface ChatCompletionParams {
|
|
|
143
143
|
* `rouva.run()` doesn't accept it. See https://rouva.io/docs#structured-output
|
|
144
144
|
*/
|
|
145
145
|
response_format?: ResponseFormat | null;
|
|
146
|
+
/**
|
|
147
|
+
* How hard a reasoning model thinks (gateway support since 2026-10-21).
|
|
148
|
+
* OpenAI models take it as is; Claude gets it as `output_config.effort`.
|
|
149
|
+
* Values depend on the model: gpt-5 / -mini / -nano take minimal–high;
|
|
150
|
+
* gpt-5.4-mini, gpt-5.6-*, gpt-6-luna / -sol take none–xhigh; gpt-6.1-sol
|
|
151
|
+
* low–xhigh; Claude Sonnet / Opus 4.6 low, medium, high, max; newer Claude
|
|
152
|
+
* models also xhigh; GPT-4 models and Claude Haiku 4.5 don't take it. Routing
|
|
153
|
+
* only picks a model that takes the value; a listed OpenAI or Claude model you
|
|
154
|
+
* name that doesn't is a 400 (other providers' models get the value as sent). On gpt-6-luna / -sol, `'none'` turns reasoning off (temperature,
|
|
155
|
+
* top_p and tools then work) and any other value turns it on (tools and
|
|
156
|
+
* top_p are then a 400). `rouva.run()` doesn't accept it.
|
|
157
|
+
* See https://rouva.io/docs#reasoning-effort
|
|
158
|
+
*/
|
|
159
|
+
reasoning_effort?: ReasoningEffort | null;
|
|
160
|
+
/**
|
|
161
|
+
* With `tools` only: `false` limits the model to at most one tool call per
|
|
162
|
+
* turn. Forwarded to OpenAI-format providers; for Claude the gateway sets
|
|
163
|
+
* `disable_parallel_tool_use` on `tool_choice`. `rouva.run()` doesn't accept it.
|
|
164
|
+
*/
|
|
165
|
+
parallel_tool_calls?: boolean | null;
|
|
146
166
|
/**
|
|
147
167
|
* Stream the response. Client-side only — controls whether `create()`
|
|
148
168
|
* returns a ReadableStream or a buffered ChatCompletion; never sent to
|
|
@@ -165,6 +185,8 @@ interface ChatCompletionParams {
|
|
|
165
185
|
*/
|
|
166
186
|
tool_choice?: string | Record<string, unknown>;
|
|
167
187
|
}
|
|
188
|
+
/** `reasoning_effort` values the gateway accepts (which ones a model takes varies). */
|
|
189
|
+
type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
168
190
|
/** `response_format` values the gateway accepts. */
|
|
169
191
|
type ResponseFormat = {
|
|
170
192
|
type: 'text';
|
|
@@ -511,4 +533,4 @@ declare class RouvaError extends Error {
|
|
|
511
533
|
constructor(kind: 'Gateway' | 'Run' | 'Request', status: number, headers: Headers, rawBody: string);
|
|
512
534
|
}
|
|
513
535
|
|
|
514
|
-
export { type AssistantToolCallMessage, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionParams, type ChatCompletionUsage, type ChatMessage, type ContentBlockMessage, type FunctionToolCall, type Message, type RequestOptions, type ResponseFormat, type ResponseMessage, Rouva, RouvaError, type RouvaModel, type RouvaOptions, type RouvaProvider, type RouvaRequest, type RouvaRequestStatus, type RouvaResponseMeta, type RouvaRouteReason, type RouvaStream, type RunParams, type RunResult, type SystemTextBlock, type ToolResultMessage };
|
|
536
|
+
export { type AssistantToolCallMessage, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionParams, type ChatCompletionUsage, type ChatMessage, type ContentBlockMessage, type FunctionToolCall, type Message, type ReasoningEffort, type RequestOptions, type ResponseFormat, type ResponseMessage, Rouva, RouvaError, type RouvaModel, type RouvaOptions, type RouvaProvider, type RouvaRequest, type RouvaRequestStatus, type RouvaResponseMeta, type RouvaRouteReason, type RouvaStream, type RunParams, type RunResult, type SystemTextBlock, type ToolResultMessage };
|
package/dist/index.d.ts
CHANGED
|
@@ -143,6 +143,26 @@ interface ChatCompletionParams {
|
|
|
143
143
|
* `rouva.run()` doesn't accept it. See https://rouva.io/docs#structured-output
|
|
144
144
|
*/
|
|
145
145
|
response_format?: ResponseFormat | null;
|
|
146
|
+
/**
|
|
147
|
+
* How hard a reasoning model thinks (gateway support since 2026-10-21).
|
|
148
|
+
* OpenAI models take it as is; Claude gets it as `output_config.effort`.
|
|
149
|
+
* Values depend on the model: gpt-5 / -mini / -nano take minimal–high;
|
|
150
|
+
* gpt-5.4-mini, gpt-5.6-*, gpt-6-luna / -sol take none–xhigh; gpt-6.1-sol
|
|
151
|
+
* low–xhigh; Claude Sonnet / Opus 4.6 low, medium, high, max; newer Claude
|
|
152
|
+
* models also xhigh; GPT-4 models and Claude Haiku 4.5 don't take it. Routing
|
|
153
|
+
* only picks a model that takes the value; a listed OpenAI or Claude model you
|
|
154
|
+
* name that doesn't is a 400 (other providers' models get the value as sent). On gpt-6-luna / -sol, `'none'` turns reasoning off (temperature,
|
|
155
|
+
* top_p and tools then work) and any other value turns it on (tools and
|
|
156
|
+
* top_p are then a 400). `rouva.run()` doesn't accept it.
|
|
157
|
+
* See https://rouva.io/docs#reasoning-effort
|
|
158
|
+
*/
|
|
159
|
+
reasoning_effort?: ReasoningEffort | null;
|
|
160
|
+
/**
|
|
161
|
+
* With `tools` only: `false` limits the model to at most one tool call per
|
|
162
|
+
* turn. Forwarded to OpenAI-format providers; for Claude the gateway sets
|
|
163
|
+
* `disable_parallel_tool_use` on `tool_choice`. `rouva.run()` doesn't accept it.
|
|
164
|
+
*/
|
|
165
|
+
parallel_tool_calls?: boolean | null;
|
|
146
166
|
/**
|
|
147
167
|
* Stream the response. Client-side only — controls whether `create()`
|
|
148
168
|
* returns a ReadableStream or a buffered ChatCompletion; never sent to
|
|
@@ -165,6 +185,8 @@ interface ChatCompletionParams {
|
|
|
165
185
|
*/
|
|
166
186
|
tool_choice?: string | Record<string, unknown>;
|
|
167
187
|
}
|
|
188
|
+
/** `reasoning_effort` values the gateway accepts (which ones a model takes varies). */
|
|
189
|
+
type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
168
190
|
/** `response_format` values the gateway accepts. */
|
|
169
191
|
type ResponseFormat = {
|
|
170
192
|
type: 'text';
|
|
@@ -511,4 +533,4 @@ declare class RouvaError extends Error {
|
|
|
511
533
|
constructor(kind: 'Gateway' | 'Run' | 'Request', status: number, headers: Headers, rawBody: string);
|
|
512
534
|
}
|
|
513
535
|
|
|
514
|
-
export { type AssistantToolCallMessage, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionParams, type ChatCompletionUsage, type ChatMessage, type ContentBlockMessage, type FunctionToolCall, type Message, type RequestOptions, type ResponseFormat, type ResponseMessage, Rouva, RouvaError, type RouvaModel, type RouvaOptions, type RouvaProvider, type RouvaRequest, type RouvaRequestStatus, type RouvaResponseMeta, type RouvaRouteReason, type RouvaStream, type RunParams, type RunResult, type SystemTextBlock, type ToolResultMessage };
|
|
536
|
+
export { type AssistantToolCallMessage, type ChatCompletion, type ChatCompletionChoice, type ChatCompletionParams, type ChatCompletionUsage, type ChatMessage, type ContentBlockMessage, type FunctionToolCall, type Message, type ReasoningEffort, type RequestOptions, type ResponseFormat, type ResponseMessage, Rouva, RouvaError, type RouvaModel, type RouvaOptions, type RouvaProvider, type RouvaRequest, type RouvaRequestStatus, type RouvaResponseMeta, type RouvaRouteReason, type RouvaStream, type RunParams, type RunResult, type SystemTextBlock, type ToolResultMessage };
|
package/package.json
CHANGED