Connection
Base URL, credentials and a reachable server.
Handle a tagged union exhaustively. Add a new state in a test change and let the type checker reveal every branch that still needs an implementation.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
switch (state.kind) {
case 'ready': return render(state.data);
case 'failed': return showError(state.error);
default: return assertNever(state);
}