Enabling tools
Tools are built-in capabilities the model can invoke during the completion. They are passed in the standard tools field of the chat completion, alongside any user-defined function tools. The platform classifies each tool by its type field and either exposes it to the model (web search, browser, find) or runs it itself before the model is called (vector database search).
Request field
The tools field is a top-level array on the request body. Each entry has a type field that disambiguates between a platform tool and a user-defined function tool. With the OpenAI SDK, pass it through the native tools parameter.
1from openai import OpenAI
2
3client = OpenAI(
4 base_url="https://api.qdiv0.com/v1",
5 api_key="your-api-key",
6)
7
8resp = client.chat.completions.create(
9 model="public:deepseek-v3.2-european",
10 messages=[{"role": "user", "content": "What's the latest news about EU AI Act?"}],
11 tools=[
12 {"type": "search"},
13 {
14 "type": "flexible_vector_database_search",
15 "vector_database": "compliance-kb",
16 "query": "EU AI Act",
17 "top_k": 5,
18 },
19 ],
20)
21print(resp.choices[0].message.content)What the model sees
The web search, browser, and find tools are re-exposed to the model as standard function tools. The model invokes them like any other tool, the platform intercepts the call, executes it, and feeds the formatted result back to the model.
The vector database search tool is different: the platform executes the search itself before the model is called, and the hits are injected as context. The model never sees a tool call for the database search; the results look like additional context attached to the user message.
User-defined function tools (entries with type: "function") are passed through to the model unchanged. The platform does not execute them — your code is responsible for handling the tool call and feeding the result back via a follow-up completion.
Mixing platform and user tools
You can put platform tools and user-defined function tools in the same tools array. The model sees a single flat list of available tools and decides which to call. Platform tools are handled by the platform; user tools are returned to your code for execution.
1{
2 "model": "public:deepseek-v3.2",
3 "messages": [
4 { "role": "user", "content": "What's our refund policy?" }
5 ],
6 "tools": [
7 { "type": "search" },
8 {
9 "type": "flexible_vector_database_search",
10 "vector_database": "support-kb",
11 "query": "refund policy",
12 "top_k": 5
13 },
14 {
15 "type": "function",
16 "function": {
17 "name": "open_ticket",
18 "description": "Open a support ticket in the CRM",
19 "parameters": {
20 "type": "object",
21 "properties": {
22 "subject": { "type": "string" },
23 "body": { "type": "string" }
24 },
25 "required": ["subject"]
26 }
27 }
28 }
29 ]
30}