DEVUP Docs
Back to Dashboard
Model-dependent reasoning

Reasoning Models

Reasoning-capable models may use additional internal computation before producing the final answer.

Some models are designed to “think through” problems step-by-step. DEVUP AI acts as a transparent proxy for these models, and does not guarantee exposure of a model's private chain-of-thought. Available controls and returned metadata depend entirely on the selected model and upstream provider.

How it works

Step 1
User request
Step 2
Reasoning-capable model
Step 3
Internal processing
Step 4
Final answer
Step 5
Usage metadata, when returned

Using reasoning models

You can interact with reasoning models using standard Chat Completions.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEVUP_API_KEY"],
    base_url="https://api.devupai.com/v1",
)

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4-Pro",
    messages=[{"role": "user", "content": "Solve this step by step: 15! / 13!"}]
)

message = response.choices[0].message
print(message.content)

if getattr(message, "reasoning_content", None):
    print(message.reasoning_content)

Reasoning output

Reasoning-capable models may return their chain of thought in a separate reasoning_content field on the message object, alongside the standard content field. Depending on the model, this field may be null or absent entirely. Clients must not assume that reasoning_content is present.

Token budget

Reasoning tokens are counted as completion tokens and are billed. Any configured max_tokens budget must cover reasoning and the answer. If the budget is exhausted during reasoning, the response carries finish_reason "length" with an empty content string — and is still billed.

Handling empty content

When processing responses from reasoning models, check the returned finish_reason and handle cases where content === "" rather than assuming a non-empty string is always returned.

Provider-specific extensions

Transparent payload forwarding

DEVUP AI guarantees standard OpenAI-compatible Chat Completions fields. However, the API acts as a transparent proxy and forwards the complete request body upstream without stripping unknown fields.

This means you may pass optional, provider-specific configuration fields (such as reasoning_effort or reasoning objects) in your payload. If the upstream provider supports them, they will be processed. Note that these are not portable across all models, and their behavior is not guaranteed by the DEVUP AI contract.

When to use reasoning models

Reasoning-capable models excel at tasks requiring careful deduction, but they are not universally superior.

Multi-step analysis
Mathematics and logic
Code planning and debugging
Complex decision support
Constraint-heavy tasks

Tasks that may not benefit from reasoning

Simple extraction, classification, translation, and short factual queries may not benefit from additional reasoning effort and could introduce unnecessary latency.

Usage and limitations

Latency

Reasoning depth may affect latency, output usage, and cost depending on the selected model. Internal processing before returning the first visible token can take significant time.

Model-dependent Support

Check the model catalog to identify which models are designed with extended reasoning capabilities.

Output Limits & Metadata

Reasoning models may consume output tokens for their internal processing. Any reported usage metadata (e.g. reasoning token counts) or streaming reasoning traces depend entirely on the upstream provider's response format and are not strictly guaranteed.

What's next