Skip to content

Conversations API, file uploads, Batch API

Latest

Choose a tag to compare

@leafo leafo released this 11 Jun 18:26
v1.8.0

Breaking Changes:

  1. Default models updated to current generation

    • Chat & Responses default model changed from gpt-4.1 to gpt-5.4
    • Embeddings default changed from text-embedding-ada-002 to text-embedding-3-small. Vectors are not comparable across models: pin model = "text-embedding-ada-002" or re-embed existing data if you rely on the old default
    • completion() default changed from the retired text-davinci-003 to gpt-3.5-turbo-instruct
  2. completion() no longer sets default temperature or max_tokens

    • Only explicitly provided parameters are sent to the API
  3. ResponsesChatSession now forwards all session options with every request

    • Previously only model, instructions, and tools were sent; options like reasoning and temperature were silently dropped
    • Unknown keys stored in session options will now be rejected by the API

New Features:

  1. Added Conversations API support for server-side conversation state

    • create_conversation(), conversation(), update_conversation(), delete_conversation()
    • conversation_items(), add_conversation_items(), conversation_item(), delete_conversation_item()
    • ResponsesChatSession accepts a conversation option, used in place of previous_response_id chaining
  2. Added file uploads and other multipart endpoints

    • upload_file() and file_content() for uploading & downloading files
    • audio_transcription() for speech to text
    • image_edit() for image editing with one or more input images
    • Encoding handled by the new openai.multipart module
  3. Added Batch API support

    • create_batch(), batch(), cancel_batch(), batches()
    • Combined with upload_file() and file_content() for the full request file → poll → results workflow
  4. Added support for the developer role in messages for both Chat Completions and Responses APIs

  5. Added compatibility clients for more providers

    • openai.compat.anthropic, openai.compat.deepseek, openai.compat.mistral, openai.compat.moonshot, openai.compat.mimo
  6. ChatSession now returns the raw API response as a second return value and stores it on chat.last_response

Improvements:

  1. Responses API parsing no longer fails on unrecognized output item types

    • Responses containing reasoning, web_search_call, and other non-message items now parse correctly
  2. Updated examples and documentation to current models, removed temperature from introductory examples