> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravi.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Atomically update session provider/model/effort/thinking, prove the result with a live provider turn, and roll back on failure

> Accepts a runtime context key on the ordinary gateway, or a signed Console delegation on the dedicated Console listener within the declared resource scope.



## OpenAPI

````yaml /openapi.json post /api/v1/sessions/update
openapi: 3.1.0
info:
  description: >-
    OpenAPI 3.1 spec auto-generated from the Ravi CLI registry. Each operation
    maps 1:1 to a `ravi <group> <command>` invocation.
  title: Ravi API
  version: snapshot
servers:
  - description: Local Ravi gateway (default)
    url: http://localhost:3000
security: []
tags:
  - description: Ask a Ravi Page's managers for access and follow the request
    name: access
  - description: Inspect session adapters and their debug snapshots
    name: adapters
  - description: >-
      The operator's calendar in the Ravi Console: meetings, recording and
      briefings
    name: agenda
  - description: Agent management
    name: agents
  - description: Discover and validate Ravi app manifests
    name: apps
  - description: Generic artifact ledger and lineage tools
    name: artifacts
  - description: Audio generation tools (TTS)
    name: audio
  - description: >-
      The Console's authority document, as this machine's daemon reads and keeps
      it
    name: authority
  - description: Typed project databases (Bases) in Ravi Console
    name: bases
  - description: Enroll the private Console human bridge
    name: bridge
  - description: Manage Ravi MCP bridges through Console
    name: bridges
  - description: File, comment on, and track global Ravi bug reports on Console
    name: bug
  - description: Manage local-first Ravi calendars
    name: calendars
  - description: Manage native Ravi channel runner
    name: channels
  - description: Inspect canonical chats, messages, and reading queues
    name: chats
  - name: cloud
  - description: Manage Ravi prompt commands
    name: commands
  - description: >-
      Connect and manage your own accounts (Gmail, Calendar, ...) through Ravi
      Console
    name: connectors
  - description: Contact management
    name: contacts
  - description: Runtime context registry and introspection
    name: context
  - description: Inspect token and cost tracking
    name: costs
  - description: Request protected credentials without exposing their values
    name: credentials
  - description: CRM relationship surface
    name: crm
  - description: Scheduled job management
    name: cron
  - description: Manage ravi via PM2
    name: daemon
  - description: Inspect ravi.db state (locks, WAL, holders)
    name: db
  - description: Explicit questions and immutable answers owned by tasks or threads
    name: decisions
  - name: devin
  - description: Run reproducible evaluation tasks against Ravi
    name: eval
  - description: Stream live NATS events
    name: events
  - description: Send structured feedback to Ravi Console
    name: feedback
  - description: >-
      Operate Gmail through a connected Google account (yours, the person
      asking's, or a shared one)
    name: gmail
  - description: Heartbeat scheduling management
    name: heartbeat
  - description: Generic runtime hooks
    name: hooks
  - description: Link chat people to their Ravi Console account
    name: identity
  - description: Image generation tools
    name: image
  - description: Local Ravi inbox and Console delivery compatibility commands
    name: inbox
  - description: Operational insights with explicit lineage
    name: insights
  - description: Instance management (channels, policies, routes)
    name: instances
  - description: Invite people into the Console organization by email
    name: invites
  - description: Execução de chamada longa em background, com desfecho entregue na sessão
    name: jobs
  - description: Search what the org said and published, with sources
    name: knowledge
  - description: Use local-first Ravi mail
    name: mail
  - description: Register MCP servers and attach them to agents
    name: mcp
  - description: Media sending
    name: media
  - description: Meeting artifact and provider operations
    name: meetings
  - description: Daily metrics rollup and reporting
    name: metrics
  - description: Inspect Observation Plane bindings
    name: observers
  - description: 'The installation owner: the person who approves access requests'
    name: owner
  - description: Manage project-owned Ravi Pages and publish content through Console
    name: pages
  - description: Inspect provider-runtime authorization
    name: permissions
  - description: Publish verified GitHub pull requests and reconcile CI follow
    name: pr
  - description: List and create the organization's projects in Ravi Console
    name: projects
  - name: prox
  - description: Emoji reactions
    name: react
  - description: Inspect route config and live routing without drilling into instances
    name: routes
  - description: Manage Ravi runtime prompt rules
    name: rules
  - name: runtime
  - description: Run one Ravi task in a disposable E2B cloud sandbox and collect its patch
    name: sandbox
  - name: sdk
  - description: Read-only security posture of this Ravi install
    name: security
  - description: Read the current Ravi agent/session/chat context
    name: self
  - description: Bot service management
    name: service
  - description: Manage agent sessions
    name: sessions
  - description: Global settings management
    name: settings
  - description: Durable world conditions with piggyback delivery
    name: signals
  - description: Manage runtime skill gate rules
    name: skill-gates
  - description: Skill discovery, install and inspection tools
    name: skills
  - description: Native Slack workspace operations
    name: slack
  - description: Versioned Ravi specs memory
    name: specs
  - description: Sticker library management and sending
    name: stickers
  - description: Local-first sync outbox, inbox, and Console bridge
    name: sync
  - description: Deterministic tag classification rules
    name: tag-rules
  - description: Unified tags for Ravi assets
    name: tags
  - description: Task runtime for dispatching work to Ravi agents
    name: tasks
  - description: >-
      Org and project themes in the Console Library: check, publish, propose and
      set the active theme
    name: themes
  - description: Manage Ravi threads
    name: threads
  - description: CLI tools inspection and export
    name: tools
  - description: Audio transcription
    name: transcribe
  - description: Event triggers
    name: triggers
  - description: Video analysis tools
    name: video
  - name: voice
  - description: Create watches and wire their events to triggers
    name: watch
  - description: Native WhatsApp channel
    name: whatsapp
  - description: >-
      Widget templates in the Console Library: catalog, check, preview, publish
      and propose
    name: widgets
  - description: Resolve and mutate generic Work Objects through Ravi domain adapters
    name: work-objects
  - name: workflows
  - description: >-
      Operate YouTube Data API v3 and YouTube Analytics API v2 through Ravi
      credentials
    name: yt
paths:
  /api/v1/sessions/update:
    post:
      tags:
        - sessions
      summary: >-
        Atomically update session provider/model/effort/thinking, prove the
        result with a live provider turn, and roll back on failure
      description: >-
        Accepts a runtime context key on the ordinary gateway, or a signed
        Console delegation on the dedicated Console listener within the declared
        resource scope.
      operationId: sessions.update
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                effort:
                  description: >-
                    Reasoning effort
                    (none|minimal|low|medium|high|xhigh|max|ultra) or 'clear'
                  type: string
                model:
                  description: >-
                    Model id for the effective provider, or 'clear' to remove
                    the override
                  type: string
                nameOrKey:
                  description: Session name or key
                  type: string
                probeTimeout:
                  description: Liveness probe timeout in seconds (default 120)
                  type: string
                provider:
                  description: >-
                    Runtime provider (claude|codex|grok|pi) or 'clear' to remove
                    the override
                  type: string
                skipProbe:
                  description: Apply without the liveness probe (no rollback protection)
                  type: boolean
                thinking:
                  description: Thinking level (off|normal|verbose) or 'clear'
                  type: string
              required:
                - nameOrKey
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  action:
                    const: update
                    type: string
                  after:
                    additionalProperties: false
                    properties:
                      effortOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      modelOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      runtimeProviderOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      thinkingLevel:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - runtimeProviderOverride
                      - modelOverride
                      - effortOverride
                      - thinkingLevel
                    type: object
                  appliesOn:
                    const: next-turn-runtime-restart
                    type: string
                  before:
                    additionalProperties: false
                    properties:
                      effortOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      modelOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      runtimeProviderOverride:
                        anyOf:
                          - type: string
                          - type: 'null'
                      thinkingLevel:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - runtimeProviderOverride
                      - modelOverride
                      - effortOverride
                      - thinkingLevel
                    type: object
                  changed:
                    additionalProperties: false
                    properties:
                      effort:
                        type: boolean
                      model:
                        type: boolean
                      provider:
                        type: boolean
                      thinking:
                        type: boolean
                    required:
                      - provider
                      - model
                      - effort
                      - thinking
                    type: object
                  clearedProviderSession:
                    type: boolean
                  effective:
                    additionalProperties: false
                    properties:
                      effort:
                        anyOf:
                          - type: string
                          - type: 'null'
                      model:
                        anyOf:
                          - type: string
                          - type: 'null'
                      provider:
                        type: string
                      thinking:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - provider
                      - model
                      - effort
                      - thinking
                    type: object
                  notification:
                    additionalProperties: false
                    properties:
                      delivered:
                        type: boolean
                      error:
                        anyOf:
                          - type: string
                          - type: 'null'
                      topic:
                        type: string
                    required:
                      - topic
                      - delivered
                      - error
                    type: object
                  probe:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          credentialId:
                            type: string
                          credentialLabel:
                            type: string
                          durationMs:
                            type: number
                          effort:
                            type: string
                          error:
                            type: string
                          model:
                            type: string
                          ok:
                            type: boolean
                          provider:
                            type: string
                          thinking:
                            type: string
                          timedOut:
                            type: boolean
                        required:
                          - ok
                          - provider
                          - model
                          - durationMs
                        type: object
                      - type: 'null'
                  rematerializedToAgentRuntime:
                    type: boolean
                  rolledBack:
                    type: boolean
                  session:
                    additionalProperties: false
                    properties:
                      sessionKey:
                        type: string
                      sessionName:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - sessionKey
                      - sessionName
                    type: object
                  superseded:
                    type: boolean
                required:
                  - action
                  - session
                  - changed
                  - before
                  - after
                  - effective
                  - probe
                  - rolledBack
                  - superseded
                  - clearedProviderSession
                  - rematerializedToAgentRuntime
                  - appliesOn
                type: object
          description: Success — body conforms to the `@Returns` schema.
        '400':
          description: Bad request — body failed schema validation.
        '500':
          description: Internal error.
      security:
        - bearerAuth: []
        - consoleDelegation: []
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: rctx
      description: >-
        Runtime context-key (`rctx_*`) issued by the Ravi gateway. Used by
        ordinary gateway operations; not accepted by Console-only operations.
        Bootstrap the first key with `ravi daemon init-admin-key`; rotate,
        derive, and revoke via the `ravi context` family. Specs:
        `runtime/context-keys`, `sdk/auth`.
      scheme: bearer
      type: http
    consoleDelegation:
      bearerFormat: JWT
      description: >-
        Signed Console delegation, valid for at most 30 seconds and bound to the
        exact HTTP request, resource scope and pinned connection. Accepted only
        on the dedicated Console listener over private SSH, never on the
        ordinary gateway. Spec: `sdk/console-authority`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.