import type * as SarvamAI from "../../../../index.js"; /** * @example * { * model: "sarvam-105b", * input: "input" * } */ export interface ResponsesCreateRequest { model: SarvamAI.ResponsesModelIds; input: SarvamAI.ResponseInput; /** Maximum output tokens to generate, including reasoning tokens on reasoning models. If omitted, there is no default cap — generation is unbounded and continues until the model stops on its own or the context window fills. Always set this explicitly in production. Values above the model context window return `400`. */ max_output_tokens?: number; /** Sampling temperature between 0 and 2. Default **`1`** on `glm5.3` when omitted. Output is not bit-reproducible, even at `0`. */ temperature?: number; /** Must be `false` or omitted (omitting is `200` and echoed as `false`). `true` is `400 invalid_request_error` — nothing created here is retrievable. OpenAI SDKs default this to `true`, so a default `client.responses.create(...)` fails. */ store?: boolean; /** Function tools use the **flat** Responses shape (`type`, `name`, `parameters`, `strict`) — the nested chat-completions tool shape is **`400`**. `tool_choice: required` with no tools returns **`400`**. Function `arguments` in output are a JSON **string** (parse before use). Multiple tool calls per turn are supported; use **`parallel_tool_calls: true`** or omit (see that field). */ tools?: SarvamAI.ResponseFunctionTool[]; /** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */ tool_choice?: ResponsesCreateRequest.ToolChoice; /** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, the DeepSeek models, `kimi-k3.1-pro`, and `qwen38-27b`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4.1-flash-1017-interactive`, and `deepseekv4-pro`, `low`, `high`, `max`, or `none` (thinking off); on `kimi-k3.1-pro`, `low`, `medium`, `high`, or `max` (thinking is always on); on `qwen38-27b`, `none` turns thinking off. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */ reasoning?: SarvamAI.ResponseReasoning; /** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */ extra_body?: Record; /** System-style instructions. Echoed back on the response object when set. */ instructions?: string; /** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */ top_p?: number; /** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */ top_k?: number; /** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */ frequency_penalty?: number; /** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */ presence_penalty?: number; /** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */ text?: SarvamAI.ResponseTextConfig; /** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */ parallel_tool_calls?: boolean; /** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */ n?: number; /** **Ignored** on Responses. Accepted for SDK compatibility only. */ seed?: number; /** `400 invalid_request_error`. This endpoint holds no state — replay the conversation in `input`. OpenAI and Fireworks use this to continue a chat; we do not. */ previous_response_id?: string; conversation?: SarvamAI.ResponseConversation; /** `true` is `400 invalid_request_error`. This endpoint is synchronous only. */ background?: boolean; /** `400 invalid_request_error` — not supported by any serving deployment, top-level or via `extra_body`. */ max_tool_calls?: number; /** How many of the most likely tokens to return at each output position, with their log probabilities. Send it with `include: ["message.output_text.logprobs"]`; without `include`, `output[].content[].logprobs` comes back empty. `0` returns no logprobs. Supported on `sarvam-105b`, `glm5.3-flash`, `deepseekv4.1-flash-1017`, `deepseekv4.1-flash-1017-interactive`, `deepseekv4-pro`, and `qwen38-27b`; `glm5.3`, `gemma4`, and `kimi-k3.1-pro` return `400`. */ top_logprobs?: number; /** Extra data to add to the response. `message.output_text.logprobs` returns token log probabilities (use with `top_logprobs`); `reasoning.encrypted_content` is accepted. An unknown value returns `400`. */ include?: string[]; /** Accepts any additional properties */ [key: string]: any; } export declare namespace ResponsesCreateRequest { /** * Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */ type ToolChoice = SarvamAI.ToolChoiceOption | Record; }