@jambonz/schema 0.4.27 → 0.4.29

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.
@@ -327,6 +327,30 @@ The `llm` property is the only required field. It configures the text-to-text LL
327
327
 
328
328
  For Anthropic models, use `"vendor": "anthropic"` and structure messages accordingly (Anthropic uses `"role": "user"` for the system-level instruction).
329
329
 
330
+ ### Vendor-specific parameters (`vendorParams`)
331
+
332
+ `llmOptions.vendorParams` passes vendor-specific request parameters that jambonz has no first-class option for. For example, OpenRouter's provider routing and fallback models:
333
+
334
+ ```json
335
+ {
336
+ "llm": {
337
+ "vendor": "openrouter",
338
+ "model": "meta-llama/llama-3.3-70b-instruct",
339
+ "llmOptions": {
340
+ "systemPrompt": "You are a helpful voice assistant.",
341
+ "vendorParams": {
342
+ "provider": { "sort": "latency", "data_collection": "deny" },
343
+ "models": ["openai/gpt-4.1-mini", "google/gemini-3.5-flash"]
344
+ }
345
+ }
346
+ }
347
+ }
348
+ ```
349
+
350
+ - Fields are added to the vendor request: the request body for OpenAI-compatible vendors (openai, openrouter, groq, deepseek, xai, azure-openai, ...) and the generation config for `google` and `vertex-gemini`. `anthropic` and `bedrock` ignore it.
351
+ - Add-only: a field jambonz already sets (`model`, `messages`, `tools`, max tokens, `temperature`, ...) is never overridden, so use the first-class option for those.
352
+ - Not validated by jambonz. A misspelled field, or one the vendor rejects, surfaces as a vendor error on the first turn.
353
+
330
354
  ## Greeting
331
355
 
332
356
  By default (`greeting: true`), the agent prompts the LLM to generate an initial greeting before the user speaks. Set `greeting: false` if you want the agent to wait silently for the user to speak first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/schema",
3
- "version": "0.4.27",
3
+ "version": "0.4.29",
4
4
  "description": "JSON Schema definitions and validation for jambonz verb applications",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -194,7 +194,13 @@
194
194
  "reasoningEffort": {
195
195
  "type": "string",
196
196
  "enum": ["minimal", "low", "medium", "high"],
197
- "description": "Vendor-neutral thinking/reasoning effort. Mapped per-vendor by the LLM adapter (Gemini thinkingLevel, OpenAI reasoning_effort, Anthropic extended thinking); ignored by vendors without a native equivalent. 'minimal' minimizes thinking for lowest TTFT on latency-sensitive voice turns."
197
+ "deprecated": true,
198
+ "description": "Deprecated: has no effect. Accepted so existing applications keep validating. To control thinking, set the vendor's own parameter in vendorParams, e.g. {\"reasoning_effort\": \"none\"} for openai, {\"thinkingConfig\": {\"thinkingLevel\": \"minimal\"}} for google, {\"thinking\": {\"type\": \"disabled\"}} for deepseek, {\"reasoning\": {\"effort\": \"minimal\"}} for openrouter."
199
+ },
200
+ "vendorParams": {
201
+ "type": "object",
202
+ "description": "Vendor-specific request parameters, passed through as-is. Fields are added to the vendor request (the request body for OpenAI-compatible vendors such as openai and openrouter, the generation config for google and vertex-gemini) but never override a field jambonz sets itself (model, messages, tools, max tokens, temperature, ...). Not validated by jambonz; ignored by anthropic and bedrock. Example for openrouter: {\"provider\": {\"sort\": \"latency\"}, \"models\": [\"openai/gpt-4.1-mini\"]}.",
203
+ "additionalProperties": true
198
204
  },
199
205
  "tools": {
200
206
  "type": "array",