> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search models server tool

> Let a model search the Orq.ai catalog by provider, context length, capability, or input cost.

The `orq:search_models` tool searches the **Orq.ai** model catalog during a response. It is useful when a model needs to choose another model based on context length, tool support, vision support, or input cost.

Results come from the public model registry. They are not filtered to models enabled in the current workspace.

## Quick start

The examples use the client configuration from the [Server tools overview](/docs/ai-gateway/features/server-tools).

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://api.orq.ai/v3/router/chat/completions \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "openai/gpt-5.4-mini",
      "messages": [
        { "role": "user", "content": "Find a model with vision and tool support for a document workflow." }
      ],
      "tools": [
        { "type": "orq:search_models", "max_results": 5 }
      ]
    }'
  ```

  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await client.chat.completions.create({
    model: 'openai/gpt-5.4-mini',
    messages: [
      {
        role: 'user',
        content:
          'Find a model with vision and tool support for a document workflow.',
      },
    ],
    tools: [{ type: 'orq:search_models', max_results: 5 }] as any,
  });

  console.log(response.choices[0].message.content);
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  response = client.chat.completions.create(
      model="openai/gpt-5.4-mini",
      messages=[
          {
              "role": "user",
              "content": "Find a model with vision and tool support for a document workflow.",
          }
      ],
      tools=[
          {"type": "orq:search_models", "max_results": 5}
      ],
  )

  print(response.choices[0].message.content)
  ```
</CodeGroup>

## Configuration

| Parameter     | Type    | Required | Default | Description                                       |
| ------------- | ------- | -------- | ------- | ------------------------------------------------- |
| `type`        | string  | Yes      |         | Must be `orq:search_models`.                      |
| `max_results` | integer | No       | `5`     | Maximum models returned. Accepted range: 1 to 20. |

## Model-supplied filters

The model can combine these filters in a tool call:

| Filter               | Description                                       |
| -------------------- | ------------------------------------------------- |
| `query`              | Match model ID, display name, or model family.    |
| `provider`           | Match one provider.                               |
| `min_context_length` | Require at least this many context tokens.        |
| `require_tools`      | Return only models that support function calling. |
| `require_vision`     | Return only models that support image input.      |
| `max_input_cost`     | Maximum input cost in USD per 1,000 tokens.       |

Results are sorted by model ID and include model costs, context length, and capability flags.

## Cost and usage

Catalog searches have no additional charge. The number of searches appears at `usage.server_tool_use.search_models_requests`.

Pair this tool with [Subagent](/docs/ai-gateway/features/server-tools/subagent) when the calling model should select a worker model before delegating a task.
