Choose a session's model
Chooses one of a connected provider's models for the session's turns (feature session-model), in place of the Tenant's model. The Tenant's model and every other session's stay as they are. Only the application sets it, for itself or for a subject: a trusted issuer's token is refused. A turn calls one model, so the choice changes only while no turn runs or waits (409 session_busy). A provider that is not connected, or a model its catalog does not list, is 422 request_rejected.
applicationKeyAuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
sessionId*stringNylorun-Protocol*stringThe protocol version, 18
Nylorun-Subject?stringThe person an application key acts for
Nylorun-Scopes?stringThe subject's space-separated scopes; required with a subject
application/json- body
provider*string1 <= lengthmodel*string1 <= lengthThe session's model
application/json- response
configured*falsefalsechoice?curl -X PUT "https://example.com/v1/sessions/string/model" \ -H "Nylorun-Protocol: string" \ -H "Content-Type: application/json" \ -d '{ "provider": "string", "model": "string" }'{ "configured": false, "choice": { "provider": "string", "model": "string" }}Get a session's model GET
The model the session's next turn uses (feature `session-model`): its own (`source: "session"`) while its provider is connected, else the Tenant's (`source: "tenant"`). `choice` is the session's own model, kept while its provider is disconnected.
Clear a session's model DELETE
Clears the session's own model (feature `session-model`): its next turns use the Tenant's model. Refused while a turn runs or waits (`409 session_busy`).