# 02 — Serve and thinking

## OpenAI-compatible API (product)

```python
from openai import OpenAI
import os
client = OpenAI(
    api_key=os.getenv("POOLSIDE_API_KEY"),
    base_url="https://inference.poolside.ai/v1",
)
client.chat.completions.create(
    model="poolside/laguna-s-2.1",
    messages=[{"role": "user", "content": "…"}],
)
```

## vLLM (Hub)

```
vllm serve --model poolside/Laguna-S-2.1 \
  --tensor-parallel-size 4 \
  --tool-call-parser poolside_v1 \
  --reasoning-parser poolside_v1 \
  --enable-auto-tool-choice \
  --default-chat-template-kwargs '{"enable_thinking": true}'
```

## Thinking contract

- Prefer **preserved thinking**: keep prior assistant `reasoning_content`  
- Per request: `extra_body={"chat_template_kwargs": {"enable_thinking": false}}`  
- Modes: off / max (default max); no low-med-high dial yet  
- Tool format: XML-like `<tool_call>…</tool_call>` (see limitations on JSON arrays)  

## Footguns

Harness mismatch · nested JSON args · long overthinking · multi-GPU for BF16