weaver logoWeaver

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-enabled on 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.

{
  "logitBias": {
    "50256": -100
  }
}

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.

{
  "logprobs": true
}

or

{
  "logprobs": 5
}

Possible values:

  • true - Return log probabilities for generated tokens
  • number (e.g., 5) - Return log probabilities for top n tokens

Parallel Tool Calls

Control whether tool calls run in parallel.

{
  "parallelToolCalls": false
}

Possible values:

  • true - Enable parallel function calling (default)
  • false - Disable parallel function calling

Legacy Function Calls

Use older function calling API for compatibility.

{
  "useLegacyFunctionCalls": true
}

Possible values:

  • true - Use legacy function calling
  • false - Use newer tools API (default)

Structured Outputs

Enable strict schema adherence for JSON outputs.

{
  "structuredOutputs": true
}

Possible values:

  • true - Enable strict schema enforcement
  • false - Standard output behavior (default for non-reasoning models)

User Identifier

Provide a unique identifier for the end user.

{
  "user": "user_12345"
}

Format: String identifier for tracking and monitoring

Download Images

Automatically download and process images from URLs.

{
  "downloadImages": true
}

Possible values:

  • true - Download images for processing
  • false - Use image URLs directly (default)

Simulate Streaming

Force streaming simulation for non-streaming models.

{
  "simulateStreaming": true
}

Possible values:

  • true - Simulate streaming for non-streaming models
  • false - Use native streaming when available (default)

Reasoning Effort

Control reasoning depth for o-series reasoning models.

{
  "reasoningEffort": "high"
}

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.

{
  "reasoningSummary": "detailed"
}

Possible values:

  • "auto" - Condensed summaries
  • "detailed" - More comprehensive summaries
  • "undefined" - No reasoning summaries (default)

Store Generation

Save generations for model distillation.

{
  "store": true
}

Possible values:

  • true - Store generation
  • false - Do not store generation

Metadata

Add custom metadata to stored generations.

{
  "metadata": {
    "project": "documentation",
    "version": "1.0"
  }
}

Format: JSON object with string key-value pairs

Previous Response ID

Reference a previous conversation turn.

{
  "previousResponseId": "resp_abc123"
}

Format: String ID from a previous response

Instructions

Provide updated instructions for continuation.

{
  "instructions": "Respond in a more technical manner"
}

Format: String with instructions that can modify system behavior

Strict Schemas

Control schema strictness for JSON validation.

{
  "strictSchemas": true
}

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:

{
  "structuredOutputs": true,
  "reasoningEffort": "high",
  "user": "user_12345"
}

Model Compatibility

Check the OpenAI documentation for the most up-to-date compatibility information. AI SDK