Skip to content

Allow or refuse live sessions

Purpose: some programs, such as Codex and apps using the OpenAI SDK's client.responses.connect(), can talk to a model over a live session: one WebSocket connection that carries many answers. It can be quicker for long agent runs, but the gateway can't read what passes on it, so on a live session none of these apply:

  • the models the key may call;
  • guardrails;
  • budgets;
  • request logs and cost.

So live sessions are refused until you allow them. You can allow them for the whole organisation or for chosen keys only, and the Control room always tells you which keys can open one. In every edition.

In active development

Live sessions work today as described here: a key that may open one gets the provider's live session, unchanged. Checking what passes on a live session (models, guardrails, budgets, request logs and cost) is in active development. Until then, the ordinary Responses API (POST /v1/responses, streamed) gives the same answers with every control in place, and it's what a refused program is told to use.

Before you start

  • You're an organisation admin to allow live sessions. Anyone who manages a key can refuse them for that key.
  • Know which programs need them. Most don't: Codex and the OpenAI SDK work over streamed POST /v1/responses too.

Steps: for the whole organisation

  1. Open System › Settings › Gateway.
  2. Under Live sessions (WebSocket), turn Allow live sessions on or off:

    • On: keys that follow the organisation may open live sessions.
    • Off (the default): they're refused, and programs use ordinary calls instead.

    It takes effect as you switch it, at every gateway.

Settings › Gateway: Live sessions (WebSocket), with what isn't checked on a live session and Allow live sessions off

Steps: for one key

  1. Open Keys and choose the key, or choose Issue a key for a new one.
  2. On an existing key, choose Edit.
  3. Under Live sessions, choose:
    • As the organisation: every key starts here.
    • Allow: this key may open live sessions, whatever the organisation says. Only organisation admins can choose it, because it lifts the organisation's own controls for the key.
    • Refuse: never, whatever the organisation says.
  4. Choose Save (or Issue key for a new key).

A key's own choice wins either way. So you can refuse live sessions for everyone and allow one team's coding agent, or allow them for everyone and refuse them on a key that must always be checked.

Check it worked

  • The key's detail says what holds now under Live sessions. While it may open them, it also says Not on live sessions beside its guardrails, because they hold only on ordinary calls.
  • Keys › Live sessions › Allowed lists every key that may open one now.
  • While any key can, organisation admins and Compliance officers hear it on the bell ("3 keys may open live sessions", with See these keys). It goes once none can.
  • In Request logs, a live session that opened shows as Live session: only that it opened, not what passed on it.

What a program sees

A refused program gets a 400 that says whether its key or the organisation refused it, and to use POST /v1/responses. An allowed one gets the provider's live session. Its opening answer carries x-vidai-adapted: websocket_unchecked, so the program and its developers can see that the session isn't checked.

Good to know

  • A live session goes to the provider that serves the Responses API: the one named in the x-provider header, or the only provider whose Responses API is served.
  • If someone changes the setting at the gateway directly, Vidai puts it back, records it in the audit log and says so on the bell.
  • Allowing a key doesn't change its ordinary calls: they're checked, costed and logged as before.