A quick brown fox jumps over the lazy dog. This paragraph exists to judge the
reading rhythm, italic emphasis, line-height, and measure of the assistant
prose. Here is some inline code and a link to anthropic.
inline tokenThreads behave like Slack threads: branch a message, switch providers, keep the context. This blockquote checks the left rule and muted color.
| Provider | Tier | Model | Route |
|---|---|---|---|
| Claude | large | Opus 4.7 | direct |
| ChatGPT | small | GPT-4.1 | direct |
| Gemini | medium | Gemini 3 Flash | interpret |
from dataclasses import dataclass
@dataclass(frozen=True)
class ChatTurn:
role: str # "user" | "assistant" | "system"
content: str
created_at: str | None = None
def summarize(turns: list[ChatTurn]) -> str:
"""Compact a conversation into a dense summary."""
return "\n".join(f"- {t.role}: {t.content[:80]}" for t in turns if t.content)export async function* dispatch(input: DispatchInput): AsyncGenerator<StreamEvent> {
const res = await fetch(url, { method: "POST", body: JSON.stringify(input) });
if (!res.ok) {
yield { type: "error", error: `HTTP ${res.status}` };
return;
}
for await (const ev of iterateSSE(res)) {
if (ev.type === "delta") yield { type: "delta", text: ev.text as string };
}
}# Stream a reply from the proxy
curl -N -X POST http://localhost:3000/api/chat \
-H "Content-Type: application/json" \
-d '{"route":"direct","provider":"anthropic","model":"claude-opus-4-8"}'{ "type": "done", "usage": { "input": 19, "output": 9 }, "stopReason": "end_turn" }- const route = "interpret";
+ const route = chooseRoute(provider, keys, serverConfig);Inline math like and a display block:
A fenced latex block is typeset by the LaTeX viewer (toggle Rendered / Source):
Prose and math mix in one block, and escaped currency stays literal text:
That's the full surface.