Skip to content
Het fundament eronderProduct intelligence

De AI-runtime

Elk modelantwoord wordt tegen een schema gecontroleerd voordat het wordt gebruikt.

Gespreksextractie, Ask Growth Kit, contentconcepten en profielonderzoek bereiken een model via één serverfunctie. Het antwoord komt terug, ontleed tegen het schema dat dat onderdeel opgaf, zodat onbruikbare uitvoer al bij de grens sneuvelt in plaats van in een record te belanden. Sleutels blijven op de server, en welk model een onderdeel gebruikt is één regel instelling.

3provider adapters wired1config file that decides the model0API keys in the browser

Interactief voorbeeld

Bekijk het in werking

Deze rondleiding toont het geïmplementeerde backendcontract zonder account, credentials of providercalls.

Interactief voorbeeld

Explore the decisions this makes

Kies een voorbeeldstatus
Low-latency model route

Alleen deterministische voorbeelddata. De interactie gebruikt geen account-, provider- of netwerkverbinding.

Kernpunten

Waarom dit belangrijk is

Checked at the door

Structured output is parsed against the calling feature’s own schema before any code sees it. Broken output fails loudly rather than leaking into a record.

Keys never leave the server

Provider credentials live in server environment variables. Nothing AI-related ships to the browser, and the browser talks only to authenticated routes.

Routing is configuration

config/ai.ts maps each feature key to a provider and model. Changing a model never touches the feature that uses it.

Het probleem dat dit oplost

Zonder een gedeelde basis bouwt elk team deze randgevallen opnieuw, en anders.

One malformed answer breaks a screen

A model returns something that is nearly the right shape and the code trusts it. The failure shows up later, inside a record someone relies on. Parsing at the boundary makes the failure immediate and obvious.

A key drifting toward the browser

Model calls get added wherever it is convenient. One lands client-side and the credential ships to every visitor. Here the adapters are server-only, so there is nowhere for that to happen.

A model change that touches everything

A provider retires a model and the change becomes a search across the codebase. Here it is one route entry, and every caller keeps its own key.

Hoe het werkt

Het mechanisme van begin tot eind, zoals het in de repository is geïmplementeerd.

  1. 1

    A feature calls with its own key

    Server code asks for text or a structured object, tagged with a feature key such as fast, default or reasoning. Configuration decides which provider and model handle it.

  2. 2

    The call runs on the server

    The matching OpenAI, Gemini or Anthropic adapter runs with server credentials. Every route in config/ai.ts points at OpenAI today.

  3. 3

    The answer is parsed at the boundary

    Structured output is requested from the provider and then parsed with the declared schema before returning. Invalid output throws rather than passing through.

  4. 4

    The caller gets a typed result

    The feature receives a clean object plus token usage, provider and model, so cost and routing are observable without a raw string to re-parse.

Technische garanties

Wat dit wel en niet belooft

Veiligheidsgrens

Drie provideradapters zijn aangesloten en er valt niets vanzelf over als er een uitvalt. Modeluitvoer is een concept dat een mens accepteert, nooit een feit op zichzelf, en deze pagina kan geen nauwkeurigheid beloven. Of een generatie überhaupt wordt aangenomen, hangt af van het recht van de werkruimte dat onder verbruikslimieten staat beschreven.

Implementatiebewijs

De grens hierboven is geen claim maar code. Deze bestanden dragen het contract:

  • src/features/ai/runtime.ts
  • src/features/ai/contracts.ts
  • config/ai.ts
Vragen

Veelgestelde vragen

Waar De AI-runtime op rust

De documentatie beschrijft dezelfde contracten die deze pagina demonstreert.