open_responses 0.1.4 copy "open_responses: ^0.1.4" to clipboard
open_responses: ^0.1.4 copied to clipboard

Dart client for the OpenResponses API. Provides a unified, type-safe interface for interacting with multiple LLM providers through the OpenResponses specification.

0.1.4 #

This release adds inline streaming error detection for improved reliability when handling streamed responses.

  • FEAT: Detect inline streaming errors (#91). (9f0eaf37)
  • DOCS: Improve READMEs with badges, sponsor section, and vertex_ai deprecation (#90). (5741f2f3)

0.1.3 #

Internal improvements to build tooling and package publishing configuration.

  • REFACTOR: Migrate API skills to the shared api-toolkit CLI (#74). (923cc83e)
  • CHORE: Add .pubignore to exclude .agents/ and specs/ from publishing (#78). (0ff199bf)

0.1.2 #

Added baseUrl and defaultHeaders parameters to withApiKey constructors and unified equality helpers across packages.

  • FEAT: Add baseUrl and defaultHeaders to withApiKey constructors (#57). (f0dd0caa)
  • REFACTOR: Unify equality_helpers.dart across packages (#67). (ec2897f8)

0.1.1 #

Added withApiKey convenience constructor for simplified client initialization.

  • FEAT: Add withApiKey convenience constructors (#56). (b06e3df3)
  • CHORE: Bump googleapis from 15.0.0 to 16.0.0 and Dart SDK to 3.9.0 (#52). (eae130b7)

0.1.0 #

Initial release of the OpenResponses Dart client.

Features #

  • Core Client: OpenResponsesClient with configurable base URL and authentication
  • Response Creation: responses.create() for non-streaming requests
  • Streaming: responses.createStream() and responses.stream() with builder pattern
  • Multi-provider Support: Works with OpenAI, Ollama, Hugging Face, OpenRouter, and LM Studio

Request Features #

  • String or message item list input
  • System instructions via instructions parameter
  • Multi-turn conversations with previousResponseId
  • Temperature and max output tokens control
  • Service tier selection

Tools #

  • FunctionTool: Define custom functions with JSON Schema parameters
  • McpTool: Remote Model Context Protocol server tools
  • Tool choice configuration (auto, required, specific function)

Structured Output #

  • TextConfig with format options
  • JsonSchemaFormat for structured JSON responses with strict mode
  • TextResponseFormat and JsonObjectFormat

Reasoning Models #

  • ReasoningConfig with effort levels (low, medium, high)
  • Reasoning summary modes (concise, detailed, auto)
  • Access to reasoning items via response.reasoningItems

Streaming Events #

  • Full SSE event parsing with 25+ event types
  • Response lifecycle events (created, queued, in_progress, completed, failed)
  • Output item and content part events
  • Text delta and done events
  • Function call argument streaming
  • Reasoning delta and summary events
  • Error events

Content Types #

  • InputTextContent: Text input
  • InputImageContent: Image URLs with detail level
  • InputFileContent: File references
  • OutputTextContent: Text output with annotations
  • RefusalContent: Model refusal messages

Message Items #

  • MessageItem with role (user, assistant, system, developer)
  • Convenience factories: userText(), systemText(), assistantText()
  • FunctionCallItem and FunctionCallOutputItem
  • ItemReference for referencing previous items

DX Extensions #

  • response.outputText: Concatenated text from output
  • response.functionCalls: All function call items
  • response.reasoningItems: All reasoning items
  • response.hasToolCalls, response.isCompleted, response.isFailed
  • event.textDelta, event.isFinal
  • stream.text, stream.finalResponse

Error Handling #

  • OpenResponsesException sealed class hierarchy
  • ApiException with error code and details
  • AuthenticationException for auth failures
  • RateLimitException with retry-after duration
  • ValidationException for invalid requests
  • TimeoutException and AbortedException

Authentication #

  • BearerTokenProvider for API key authentication
  • NoAuthProvider for local providers (Ollama, LM Studio)
  • Extensible AuthProvider interface

Configuration #

  • OpenResponsesConfig with base URL, auth, headers, timeout
  • RetryPolicy with exponential backoff and jitter
  • Custom HTTP client support

Commits #

  • FEAT: Initial implementation of OpenResponses Dart client (#10). (4fac8fa6)
  • FEAT: Comprehensive model improvements with new features (#16). (6b6450a7)
  • FEAT: Add SummaryTextContent for reasoning models (#23). (93ce0a00)
  • FEAT: Add ReasoningInputItem, UnknownEvent, and provider aliases (#28). (e1fa0afe)
  • REFACTOR: Align client package architecture across SDK packages (#37). (cf741ee1)
  • REFACTOR: Align API surface across all SDK packages (#36). (ed969cc7)
0
likes
150
points
240
downloads

Publisher

verified publisherdavidmiguel.com

Weekly Downloads

Dart client for the OpenResponses API. Provides a unified, type-safe interface for interacting with multiple LLM providers through the OpenResponses specification.

Homepage
Repository (GitHub)
View/report issues

Topics

#nlp #gen-ai #llms #openresponses

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

http, logging, meta

More

Packages that depend on open_responses