For the complete documentation index, see llms.txt. This page is also available as Markdown.

Model-specific Notes

Model-specific Serverless parameters for DeepSeek V3.1, Qwen3.5, and GPT-OSS models on Parasail.

Most Serverless models work with the standard Chat Completions API and sampling parameters. Some models expose extra controls through extra_body, custom_params, or chat_template_kwargs.

DeepSeek V3.1 thinking mode

Use chat_template_kwargs.thinking to turn thinking mode on or off. Pass a JSON boolean, not a string.

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.parasail.io/v1",
    api_key=os.environ["PARASAIL_API_KEY"],
)

chat_completion = client.chat.completions.create(
    model="parasail-deepseek-31",
    messages=[{"role": "user", "content": "What is the capital of New York?"}],
    extra_body={"chat_template_kwargs": {"thinking": True}},
)

print(chat_completion.choices[0].message.content)
curl -X POST https://api.parasail.io/v1/chat/completions \
  -H "Authorization: Bearer $PARASAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "parasail-deepseek-31",
    "chat_template_kwargs": {"thinking": false},
    "messages": [{"role": "user", "content": "What is the capital of New York?"}]
  }'

Qwen3.5 thinking mode

Use chat_template_kwargs.enable_thinking to turn Qwen3.5 thinking mode on or off. Qwen-specific sampling settings such as top_k belong in extra_body.

GPT-OSS reasoning control

GPT-OSS models support explicit reasoning controls that trade depth for latency and cost.

Parameter
Type
Description

thinking_budget

integer

Upper bound on internal reasoning tokens.

reasoning_effort

low, medium, or high

Qualitative control over how deliberately the model reasons.

Practical defaults

Goal

thinking_budget

reasoning_effort

Fast and lower cost

10

low

Balanced default

25

medium

Deeper reasoning

40 or higher

high

Structured outputs with GPT-OSS

Use response_format.type = "json_schema" with GPT-OSS models when the response must be valid JSON that matches a schema. You can combine structured output with GPT-OSS reasoning controls in the same request: put response_format at the top level, and put thinking_budget and reasoning_effort in extra_body.

Parsing and strictness notes:

  • Use strict: True with additionalProperties: False to keep the response limited to the schema.

  • Parse resp.choices[0].message.content with json.loads() and use the parsed object as the source of truth.

  • For streaming responses, concatenate the JSON text from delta.content chunks and parse it after the stream ends.

For full schema guidance, see Structured Output.

Next steps

Last updated