session

Switch session agent

Changed on

Switch the agent used by subsequent provider turns.

post/api/session/{sessionID}/agent

Request

  • Base URL
    https://opencode.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://opencode.ai/api/session/{sessionID}/agent
  • Auth
    none required

Path parameters

sessionIDstring required

Request body

agentstring required

Response

<No Content>

Changes

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed from the response body anyOf list for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status