Skip to content

v5.5.0

Choose a tag to compare

@fede-kamel fede-kamel released this 16 Nov 14:53
8b1faf2

Added

  • Reasoning effort on OCIResponsesModel. OCIResponsesConfig takes
    reasoning_effort (also a constructor argument), sent as
    reasoning={"effort": ...} on both complete() and stream(). A
    reasoning_effort call kwarg, such as an agent's model_kwargs,
    overrides it for that call. Unset, no reasoning field is sent, so the
    request body is unchanged. Before, reasoning_effort passed to the
    constructor or in model_kwargs was dropped without a warning.

Fixed

  • OCIResponsesModel.stream() error bodies. A non-2xx on the streaming
    path was raised as httpx.ResponseNotRead, because the error body had not
    been read when it was classified. The body is read first now, so the typed
    exceptions and the server's message surface exactly as on complete().
    Classification also reads the error's param field, so an envelope that
    names previous_response_id there rather than in the message still maps
    to OCIResponsesStateLostError.
  • OCIProjectRequiredError on a 400. The Responses endpoint signals the
    project requirement for non-OpenAI models with a 400 naming the
    OpenAI-Project / opc-conversation-store-id header. That is now mapped to
    OCIProjectRequiredError instead of a plain RuntimeError.
  • project_ocid reaches the Responses endpoint. It was sent only as
    opc-project-id, which the endpoint does not read for this requirement, so
    following the exception's advice changed nothing. The OCID now also goes out
    as OpenAI-Project; with it a non-OpenAI model answers on /responses.