HaughtAI
HaughtAI

Build

Bring your own model

Point HaughtStudio at a model you run yourself.

When this is for you

HaughtStudio is not tied to HaughtAI's model. It sends every turn to whatever OpenAI-compatible endpoint you configure, so you can run a specific model — a fine-tune, a specialist you have been working with, one served by your own hardware, or one you are licensed to operate — and use it with personas, skills and Connectors as usual.

You want…What to do
A model you already serveEnter its address on the Model settings. Nothing else changes.
A model only you can reachServe it, then give the studio an address it can reach. See Where to run it.
To compare two models on one personaChange the model name, keep everything else. A persona is model-independent.
A model served by a providerUse the provider's base URL and key. Nothing here is HaughtAI-specific.

Where it is configured

Settings → Model. Three fields and a status chip:

FieldWhat it is
Base URL The endpoint. A trailing /chat/completions is appended if your address does not already end with it, so https://models.example.com/v1 and the full path both work.
API key Sent as a bearer token. Leave it empty if your endpoint does not check one.
Model name The exact name your endpoint serves. It must match; a mismatch is refused by your endpoint, not translated.
Status chip Shows the resolved endpoint and whether a key is set. It does not prove the endpoint works — the first turn does that.

Settings saved on the screen win over anything a deployment was started with, so a change here takes effect on the next turn with no restart. Temperature sits beside it and applies to every persona that does not set its own.

Nothing about the model is stored on a server: the address, key and model name live in your browser and travel with each turn. That also means a backup contains the key — treat a backup the way you would treat a password.

What your endpoint must do

It must accept a POST of an OpenAI-shaped chat request and answer with a stream of server-sent events. That is the whole contract.

The request

POST https://models.example.com/v1/chat/completions
Content-Type: application/json
Accept: text/event-stream
Authorization: Bearer YOUR_MODEL_KEY

{"model":"my-model","stream":true,"temperature":0.7,
 "messages":[{"role":"system","content":"..."},{"role":"user","content":"Hello"}]}

Fields sent: model, messages, stream: true, and temperature — plus tools and tool_choice: "auto" when the persona has something callable. stream is always true: there is no non-streaming path.

The response

HTTP/1.1 200 OK
Content-Type: text/event-stream

data: {"choices":[{"delta":{"content":"Hel"}}]}

data: {"choices":[{"delta":{"content":"lo."}}]}

data: [DONE]

  • One data: line per event, then a line reading data: [DONE].
  • Text goes in choices[0].delta.content.
  • Lines that do not start with data: are ignored, so comments and blank separators are harmless.
  • An error object in any frame stops the turn and is shown to the reader.

Timeouts

20 seconds to connect, 600 seconds to read. The second number is generous, but it is a total: a model that takes two minutes to produce its first token still has to finish inside it. If you are loading large weights on demand, warm the model before the first turn.

When it goes wrong

The messages a reader will see are deliberately plain:

  • "Could not reach the endpoint" — the address did not resolve, refused the connection, or timed out.
  • "Returned HTTP …" with the first part of the body — the endpoint answered, but not with success.
  • "No model API key is configured" — the key field is empty and the endpoint needs one.

None of these are a studio problem, and none of them discard work: the conversation, personas, skills and Connectors all stay usable while the model is unreachable.

Tool calling

This is the one part of the contract that is easy to miss and expensive to discover late. If a persona carries a skill or a Connector, the request includes tool definitions and asks the model to choose. A model that cannot call tools still answers — it simply cannot open a skill or use a Connector.

What the model supportsWhat works
Streaming onlyChat with a persona's identity. No skills, no Connectors.
Streaming and tool callsEverything.
NeitherNothing — stream: true is always sent.

A tool call arrives as deltas that must be accumulated by index — the function name arrives once, the arguments arrive in fragments:

data: {"choices":[{"delta":{"tool_calls":[{"index":0,"id":"call_1","function":{"name":"use_skill","arguments":"{\"skill_id\":"}}]}}]}

data: {"choices":[{"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"3U729O\"}"}}]}}]}

data: [DONE]

A turn allows up to 8 rounds of tool calls. That is enough for a skill lookup followed by a Connector call; it is not enough to wander, by design. A model that calls tools indefinitely will be cut off.

Test with a persona that carries one skill before building a workflow on a model. If the skill never opens, tool calling is the reason, and no amount of prompt work in the identity will fix it.

Reasoning output

If your model emits reasoning tokens, put them in delta.reasoning_content (or delta.reasoning). They are collected into a collapsed Thought process panel rather than mixed into the answer:

data: {"choices":[{"delta":{"reasoning_content":"The user greeted me."}}]}

data: {"choices":[{"delta":{"content":"Hello."}}]}

data: [DONE]

Sending them as ordinary content also works, but the reasoning becomes part of the answer text and the reader can no longer tell the two apart.

Where to run it

OptionGood forWatch out for
A machine on your network Trying a model, private work, no hosting bill Reachable only from where the studio runs — see the callout below
A server you rent with a GPU Always-on use, serving several people The cost is yours whether or not anyone is chatting
A provider's hosted endpoint No operations at all Their terms, their limits, their retention

The studio's server makes the request, not your browser. 127.0.0.1 therefore means the machine running HaughtStudio. A model on your laptop works when the studio runs on that laptop; otherwise give it a LAN address or a public one.

Making an endpoint fast enough

  • Keep the first token quick. Queued requests behind a long generation will time out.
  • Serve one model per address, and give each a distinct name.
  • If you quantise, test the quantised build with a persona rather than a bare prompt — tool calling degrades before prose does.

Custody and what is not covered

  • The key is yours to protect. It is stored in your browser, sent with each turn, and included in a backup. Use one you can revoke.
  • HaughtAI does not vet the model you point at. Its behaviour, its licence and your provider's terms are yours. Pointing at a model changes nothing about what you are allowed to do with the service.
  • This is separate from publishing. A Connector you publish is subject to the marketplace rules whatever model your own personas run on. Publishing is about the server you offer, not the model you use.
  • Usage is not metered by the studio. HaughtAI's token balance applies to HaughtAI's model. What your own endpoint costs is between you and whoever runs it.