Platform / HANDBOOK
Models and providers
Keep model selection, credentials, teaching behavior, and workspace execution independently configurable.
A model is one part of the teacher
Keating's teaching protocol, deterministic tools, learner context, and stored evidence sit around the selected model. Changing providers should not remove the teaching loop or move account authority into a model adapter. A provider configuration defines how inference is reached; runtime capabilities define what tools can execute.
The CLI integrates with Pi's provider and model configuration. Browser and native clients have their own transport constraints. Treat supported wire formats, streaming, tool calls, images, audio, and authentication as separate capabilities instead of assuming that an OpenAI-compatible URL implements everything.
Model discovery is advisory
Provider keys belong to the provider identity and are reused by its models. A failed model-list request must not invalidate a saved provider configuration: some compatible endpoints omit discovery or require a known model identifier.
When adding an adapter, cover streaming completion, cancellation, error responses, model capability selection, and credential routing. Keep the supplied endpoint and selected model visible enough for a learner to understand where a request goes.
Browser-local inference has concrete constraints
The browser model registry selects exports supported by the installed Transformers.js and ONNX Runtime stack. Compatibility depends on file layout, supported architecture, quantization kernels, download size, and available device memory. A model card or an ONNX filename alone does not establish that a browser can load it.
Use the registry and browser-model notes as the implementation source of truth, and verify an actual load on representative hardware when changing it. Model availability and runtime support change; this guide intentionally does not promise a permanent model list or a universal memory requirement.
Hosted inference and remote tools are different
A hosted model call does not imply that workspace files or tool execution must live on the same server. Conversely, choosing a local model does not grant access to native binaries. The runtime capability boundary lets Keating request a remote operation deliberately when local execution is insufficient.
Keep credentials and account billing at their intended authority boundary. A browser-local mode should report that a required remote capability is unavailable rather than silently dispatching work to a hosted service.
Native transport and speech are explicit adapters
Mobile implements streaming for supported OpenAI-compatible, Anthropic, and Gemini wire formats using its native fetch path. It buffers deltas for rendering and preserves partial output when the learner stops a response. The transport implementation is separate from the shared pedagogy adapter.
Speech is an optional delivery path alongside the reasoning and teaching model. Keep provider-specific live audio behavior in speech adapters, and do not treat an audio attachment's metadata as proof that the selected model received or interpreted its content.