OpenAI
Detailed guide to configuration options for OpenAI models in Weaver
Enable markdown output for O-series models
System Prompt for Markdown Formatting
Weaver automatically handles insertion of the developer message for o-series reasoning models. If for whatever reason it does not output as markdown, you can manually insert the prompt.
Starting with o1-2024-12-17, reasoning models in the API will avoid generating responses with markdown formatting. To signal to the model when you do want markdown formatting in the response, include the string
Formatting re-enabledon the first line of your developer message.
See OpenAI - How to prompt reasoning models effectively
OpenAI Provider Options
Weaver supports numerous provider-specific configuration options for OpenAI models. These can be set in the Provider Options (JSON) field in the chat configuration settings.
Available Provider Options
Logit Bias
Modify the likelihood of specific tokens appearing in completions.
Format: A JSON object mapping token IDs to bias values ranging from -100 to 100.
- Negative values decrease likelihood of token selection
- Positive values increase likelihood
- Extreme values (-100/100) can ban or force token selection
Log Probabilities
Return probability information for generated tokens.
or
Possible values:
true- Return log probabilities for generated tokensnumber(e.g., 5) - Return log probabilities for top n tokens
Parallel Tool Calls
Control whether tool calls run in parallel.
Possible values:
true- Enable parallel function calling (default)false- Disable parallel function calling
Legacy Function Calls
Use older function calling API for compatibility.
Possible values:
true- Use legacy function callingfalse- Use newer tools API (default)
Structured Outputs
Enable strict schema adherence for JSON outputs.
Possible values:
true- Enable strict schema enforcementfalse- Standard output behavior (default for non-reasoning models)
User Identifier
Provide a unique identifier for the end user.
Format: String identifier for tracking and monitoring
Download Images
Automatically download and process images from URLs.
Possible values:
true- Download images for processingfalse- Use image URLs directly (default)
Simulate Streaming
Force streaming simulation for non-streaming models.
Possible values:
true- Simulate streaming for non-streaming modelsfalse- Use native streaming when available (default)
Reasoning Effort
Control reasoning depth for o-series reasoning models.
Possible values:
"low"- Minimal reasoning (faster)"medium"- Balanced reasoning (default)"high"- Extensive reasoning (slower but more thorough)
Reasoning Summaries
Controls whether the model returns its reasoning process.
Possible values:
"auto"- Condensed summaries"detailed"- More comprehensive summaries"undefined"- No reasoning summaries (default)
Store Generation
Save generations for model distillation.
Possible values:
true- Store generationfalse- Do not store generation
Metadata
Add custom metadata to stored generations.
Format: JSON object with string key-value pairs
Previous Response ID
Reference a previous conversation turn.
Format: String ID from a previous response
Instructions
Provide updated instructions for continuation.
Format: String with instructions that can modify system behavior
Strict Schemas
Control schema strictness for JSON validation.
Possible values:
true- Use strict JSON schema validation (default)false- More lenient schema validation
Combining Multiple Options
You can combine multiple provider options in a single configuration:
Model Compatibility
Check the OpenAI documentation for the most up-to-date compatibility information. AI SDK