Skip to content
CAI
Software that uses CAICheck a score

cyberchitta/openai_ex

62.6

Adequate · 18 September 2026

3k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

OpenaiEx is an Elixir library that provides a comprehensive client for interacting with the OpenAI API, including support for Azure OpenAI deployments. It covers a wide range of endpoints such as chat completions, audio processing, image generation, and the Assistants API v2 with vector stores. The library is designed for integration into Elixir applications, featuring robust error handling, streaming support, and extensive documentation via Livebook notebooks.

Features

Add OpenAI Audio API support for speech, transcription, and translation

New modules have been added to the audio library to support OpenAI's speech, transcription, and translation endpoints. Users can now generate audio from text using the Speech API, transcribe audio files to text via the Transcription API, and translate audio into English using the Translation API. Each module provides \new/1\ for building request parameters and \create/2\ or \create!/2\ for executing the API calls, with transcription and translation handling multipart file uploads.

_lib/openai\ex/audio · high confidence

Added sample assets for Batch API, fine-tuning, and documentation

New sample files have been added to the assets directory to support specific API features and user guides. The \batch-requests.jsonl\ file provides example payloads for the Batch API using the \gpt-4o-mini\ model, while \fine-tune.jsonl\ contains a template for fine-tuning data. Additionally, \cyberdyne.txt\ serves as a sample document for user guide demonstrations.

assets · high confidence

Initial configuration for LLM context generation

Adds the \.llm-context\ directory to establish a structured system for generating AI project context. This includes a main configuration file (\config.yaml\) defining Jinja2 templates for assembling prompts, along with a comprehensive set of rule files in \rules/\ that control file filtering (excluding binaries, logs, and test files), code outlining (extracting function/class definitions for various languages), and style guidelines (covering Python, JavaScript, Elixir, and Jupyter). The setup also provides specific prompt instructions for developer personas and rule creation workflows, enabling the tool to produce focused, token-efficient context for LLM interactions.

.llm-context · high confidence

New and updated Livebook examples for OpenAI API features

The notebooks directory now includes a comprehensive set of executable Livebooks demonstrating OpenaiEx capabilities. A new beta\_guide.livemd provides a user guide for the Assistants, Threads, and Runs beta APIs, including examples for creating, modifying, and deleting assistants and threads. A cleanup.livemd notebook is added to help users programmatically delete files, assistants, and vector stores. The images.livemd notebook demonstrates image generation using the gpt-image-1 model. Existing examples have been updated: completions.livemd now covers the deprecated Completion API with streaming support, while dlai\_orderbot.livemd and streaming\_orderbot.livemd provide Elixir translations of the Deeplearning.AI Order Bot, with the latter adding request cancellation support. The userguide.livemd has been updated to reflect the latest API features, including the Responses API and Azure OpenAI configuration.

notebooks · high confidence

OpenAI API client library rewritten with Finch and new API support

The library has been completely rewritten to use the Finch HTTP client, introducing a new application supervision tree and standardized error handling via OpenaiEx.Error structs. This update adds support for numerous new OpenAI endpoints including Batches, Containers, Container Files, Conversations, Conversation Items, Evals, and the Responses API, while also updating Chat Completions with new parameters like reasoning models, web search, and prompt cache options. The HTTP layer now properly handles multipart form data, SSE streaming with configurable timeouts, and redacts API tokens in error logs.

_lib/openai\ex · high confidence

Behavioural changes

Major refactor of OpenaiEx client configuration and API support

The core client module has been significantly restructured to support Azure OpenAI deployments, configurable timeouts, and arbitrary HTTP headers. Users can now initialize the client with an organization and project ID, and configure receive and stream timeouts (defaulting to 15 seconds). The library adds specific helpers for Azure OpenAI integration, including path mapping for API versions and resource-specific base URLs. Additionally, the client now supports adding custom headers and allows for path mapping customization, while removing the previous simple 'hello' world function in favor of a more robust struct-based configuration system.

lib · high confidence

Migrate development environment to Livebook with updated configuration

The development container now uses the Livebook service (image 0.19.9) instead of the previous web service, changing the workspace folder to /data and exposing ports 8080, 8081, and 8000. Configuration has shifted from hardcoded values to environment variables (LIVEBOOK\_PASSWORD, OPENAI\_API\_KEY, OPENAI\_ORGANIZATION) sourced from a new .env file, and VS Code extensions were updated to include GitLens while removing SQL tools. A workaround for an Erlang DNS resolution issue was added by pinning a specific IP for raw.githubusercontent.com.

.devcontainer · high confidence

New OpenAI Assistants API v2 client implementation

The \lib/openai\_ex/beta\ directory has been completely rewritten to implement the OpenAI Assistants API v2. This change introduces dedicated modules for managing the full assistant lifecycle (\OpenaiEx.Beta.Assistants\), conversation threads (\OpenaiEx.Beta.Threads\), and thread messages (\OpenaiEx.Beta.Threads.Messages\). It also adds support for executing runs with tool output handling and streaming (\OpenaiEx.Beta.Threads.Runs\), inspecting run steps (\OpenaiEx.Beta.Threads.Runs.Steps\), and managing vector stores and their associated files and batches (\OpenaiEx.Beta.VectorStores\, \OpenaiEx.Beta.VectorStores.Files\, \OpenaiEx.Beta.VectorStores.File.Batches\).

_lib/openai\ex/beta · high confidence

Retroactive changelog added and project documentation significantly expanded

The project now includes a comprehensive CHANGELOG.md documenting all changes from version 0.8.0 onwards, providing users with a clear history of features, fixes, and breaking changes. The README has been completely rewritten to highlight the library's battle-tested nature, Livebook-first design, and support for modern OpenAI APIs like the Responses API and Containers. Additionally, the formatter configuration was updated to enforce a 120-character line length, and the .gitignore was expanded to exclude VS Code extension directories and development secrets.

(repo-wide) · high confidence

Test coverage

Added doctests for OpenAI API modules

The test suite now includes doctests for a wide range of OpenAI API modules, including Chat.Completions, Completion, ChatMessage, Embeddings, Images.Generate, Moderations, MsgContent, Beta.Assistants, Beta.Threads.Runs, Containers, ContainerFiles, and VectorStores. This replaces the previous generic greeting test with comprehensive documentation tests for these specific components.

test · high confidence

Dependencies

Initial release of OpenAI Ex library with Finch HTTP client

This change introduces the OpenAI Ex library (version 0.9.22), a community-maintained Elixir client for the OpenAI API. The project is configured to depend on Finch (\~\> 0.21) for HTTP requests, Jason for JSON parsing, and Multipart (\~\> 0.6) for file uploads. It also includes development dependencies for documentation (ExDoc), static analysis (Credo), and type checking (Dialyxir), and is structured to publish to Hex with Apache-2.0 licensing.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 63.

Lenses

  • Code Health 100
  • Architecture 96
  • Maturity 62
  • Readiness 50
  • Security 78

Changes since last survey

  • 300 commits — 263 feature/other, 37 fixes

By area

  • lib/openai_ex — 118 commits
  • (root) — 66 commits
  • (repo) — 39 commits
  • notebooks/userguide.livemd — 22 commits
  • .devcontainer/docker-compose.yml — 9 commits
  • lib/openai_ex.ex — 9 commits
  • .llm-context/rules — 6 commits
  • notebooks/cleanup.livemd — 6 commits
  • .llm-context/templates — 5 commits
  • notebooks/streaming_orderbot.livemd — 4 commits
  • .github/workflows — 2 commits
  • notebooks/completions.livemd — 2 commits
  • notebooks/dlai_orderbot.livemd — 2 commits
  • notebooks/images.livemd — 2 commits
  • .devcontainer/devcontainer.json — 1 commit
  • .github/ISSUE_TEMPLATE — 1 commit
  • .llm-context/config.toml — 1 commit
  • .llm-context/config.yaml — 1 commit
  • .llm-context/lc-prompt.md — 1 commit
  • assets/batch-requests.jsonl — 1 commit

Notable commits

  • fix: Fix #100
  • fix: Fix pattern matching of function clauses
  • fix: Merge pull request #120 from cyberchitta/issue-119/streaming-timeout-bug
  • fix: Merge pull request #122 from nschechter/fix/add-multiple-images
  • fix: Merge pull request #134 from spaenleh/fix-typos-notebook
  • fix: chore: bump livebook to 0.19.9 and kino to 0.19, fix elixir 1.19 deprecation
  • fix: chore: fix credo warnings
  • fix: chore: fix front matter
  • fix: chore: fix mix install in user guide
  • fix: fix corner case
  • fix: fix(doc): make comment consistent with repo style, fix reference links
  • fix: fix(error): handle list-formatted errors from Gemini API
  • fix: fix: add new 4o image gen api fields
  • fix: fix: add support for multiple images
  • fix: fix: add tool_calls support to ChatMessage & fix string/atom key inconsistency
  • fix: fix: avoid potential race condition
  • fix: fix: clean up streaming tasks to prevent unexpected messages
  • fix: fix: cleanup streaming task in error path
  • fix: fix: fix error masking during streaming
  • fix: fix: flatten query metadata
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

cyberchitta/openai_ex was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 538c91ed4bdcc02ec150deee18f7478cd96a6ee1 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.