Skip to content
CAI
Software that uses CAICheck a score

elixir-tesla/tesla

70.4

Strong · 13 November 2026

8.8k

lines of production code

Elixir

primary language

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Initial project scaffolding and documentation

The repository has been initialized with core configuration files including \.editorconfig\, \.formatter.exs\, and \.commitlintrc.yml\ to enforce code style and commit conventions. A comprehensive \README.md\ has been added to document the Tesla HTTP client, its middleware architecture, supported adapters (Mint, Finch, Hackney, etc.), and usage examples. Additionally, standard project files such as \LICENSE\, \CONTRIBUTING.md\, \.gitignore\, and \CHANGELOG.md\ are present to establish the project's legal, contribution, and versioning standards.

(repo-wide) · high confidence

New OpenAPI parameter serialization and path templating modules

This release introduces a comprehensive set of new modules in \lib/tesla/open\_api\ to handle OpenAPI-compliant parameter serialization and path templating. It adds dedicated value objects and collections for query (\QueryParam\, \QueryParams\), header (\HeaderParam\, \HeaderParams\), cookie (\CookieParam\, \CookieParams\), and path (\PathParam\, \PathParams\) parameters, each supporting explicit style, explode, and reserved character settings. A new \PathTemplate\ module provides precompiled path parsing to optimize request URL construction. Additionally, a \QueryString\ module handles whole-URL query string serialization for \in: "querystring"\ parameters, and a \Response\ macro simplifies the creation of typed response wrappers for generated clients.

_lib/tesla/open\api · high confidence

New documentation for HTTP methods, streaming, and OpenAPI integration

Added two new cheat sheets to the guides directory: a general guide covering basic request methods (including the new QUERY method support), request streaming, middleware, and adapter customization, and an OpenAPI guide detailing the mapping of OpenAPI parameters to Tesla APIs, client stack configuration, response wrapper macros, and generated operation metadata.

guides/cheatsheets · high confidence

New middleware collection for authentication, compression, and URL handling

This change introduces a suite of new middleware components to the library. Authentication capabilities are expanded with \BasicAuth\, \BearerAuth\, and \DigestAuth\ middlewares. URL handling is enhanced by \BaseUrl\ (with a strict policy for security) and \FollowRedirects\ (which now handles cross-origin header stripping and 303/307 method preservation). Data handling includes \Compression\ (with safe streaming decompression and size limits), \FormUrlencoded\ (supporting nested maps and bracket notation), \MessagePack\, and \DecodeRels\. Additionally, \KeepRequest\ allows storing original request data for observability, \MethodOverride\ enables POST-based method spoofing, and \Fuse\ provides circuit breaker functionality.

lib/tesla/middleware · high confidence

Behavioural changes

Enhanced OpenTelemetry logging with semantic metadata and URL template support

The OpenTelemetry integration now emits richer semantic metadata for HTTP requests, including the full URL, scheme, server address, and port, while automatically redacting user credentials from the URL string. It also supports the \url.template\ attribute (via OpenTelemetry's incubating attributes) when a preserved request URL is available, and includes the HTTP response status code and error type in the logs. This change introduces a new \SemConv\ module to handle these semantic conventions, ensuring compatibility with the loaded OpenTelemetry SemConv library.

lib/tesla/opentelemetry · high confidence

Introduction of Tesla.client/2 and structured middleware pipeline

The library now provides \Tesla.client/2\ as the primary way to build API clients with a specific set of middlewares and an adapter, replacing the previous \Tesla.build\_client/1\ approach. This change introduces a structured middleware pipeline where requests are processed through pre-middleware, module-defined middleware, post-middleware, and finally the adapter. The \Tesla.Env\ struct has been expanded to include \assigns\ and \private\ fields for storing user and library-specific data respectively, and the default adapter is now explicitly set to \Tesla.Adapter.Httpc\ with support for global configuration overrides.

lib · high confidence

Migrate to Elixir 1.10+ config syntax and update application defaults

The configuration file has been updated to use the modern \import Config\ syntax, replacing the deprecated \use Mix.Config\. This change introduces new default settings for the application: Logger is configured to output at the debug level with a specific format, SASL error logging is suppressed, and the httparrot test helper is configured with specific HTTP/HTTPS ports and SSL enabled. Additionally, the Tesla client is explicitly set to use the Mock adapter for testing, and the deprecated builder warning is disabled.

config · high confidence

Migrated HTTP adapters to a new implementation

The HTTP adapters (Finch, Gun, Hackney, Httpc, Ibrowse, and Mint) have been rewritten from scratch. This migration introduces consistent support for request and response streaming, multipart uploads, and proxy authentication across all adapters. Users will benefit from improved error handling, better connection reuse, and updated compatibility with recent versions of the underlying HTTP libraries.

lib/tesla/adapter · high confidence

Modern path parameter middleware with OpenAPI support and strict validation

The path\_params middleware now includes a new 'modern' mode that supports OpenAPI-style path parameters, allowing for precompiled path templates and distinct definitions from values. This mode enforces stricter validation by raising an error when required path parameter values are missing, and it handles various serialization styles (simple, matrix, label) for primitives, arrays, and objects.

_lib/tesla/middleware/path\params · high confidence

Redesigned client architecture with runtime configuration and new middleware manipulation APIs

The library has been refactored to replace compile-time \use Tesla\ builder macros with runtime client configuration via \Tesla.Client\. This introduces a new \Tesla.Client\ struct and a suite of functions for dynamic middleware management, including \put\_middleware/2\, \update\_middleware/2\, \update\_middleware!/3\, \replace\_middleware!/3\, and \insert\_middleware!/4\. The \Tesla.Env\ struct has been extended with \assigns\ and \private\ fields to support user data and library-reserved metadata. Additionally, the \Tesla.Builder\ module now emits a deprecation warning for the old compile-time approach, guiding users toward the new runtime pattern.

lib/tesla · high confidence

Test coverage

Added OpenAPI parameter collection benchmarks; Added comprehensive test suites for all HTTP adapters; Added test coverage for Builder, Client middleware manipulation, Mocking, Multipart validation, and Test helpers; Added test coverage for OpenAPI parameter serialization and response handling; Added test support infrastructure for HTTP adapters and mocking; Added tests for OpenAPI-style query parameter serialization; Added tests for modern-style OpenAPI path parameter rendering; Added unit tests for Tesla middleware suite; Expanded adapter test suite for streaming, multipart, and query methods; Expanded test coverage for adapter configuration, middleware execution, and dynamic clients.

Dependencies

Tesla v1.21.3 dependency update and project configuration overhaul

This release updates the project's dependency lockfile (mix.lock) and significantly refactors the mix.exs configuration. The lockfile now pins specific versions for core HTTP adapters and utilities, including Finch 0.23.0, Mint 1.10.0, Hackney 4.7.4, Gun 2.6.0, and Castore 1.0.21, alongside dev tools like ExDoc 0.40.4 and Dialyxir 1.4.8. The mix.exs file has been upgraded to require Elixir \~\> 1.14, expanded the OTP application to include :ssl and :inets, and introduced structured package metadata, dialyzer PLT configuration, and comprehensive documentation settings. These changes ensure compatibility with modern Elixir versions and standardize the development and testing environment.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 70 → 70 (+0.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (-0.5)
  • Architecture 92 → 92 (+0.1)
  • Maturity 52 → 53 (+1.8)
  • Readiness 87 → 87 (-0.4)
  • Security 83 → 81 (-2.3)
  • Performance 90 → 90 (+0.0)

Resolved (5)

  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • Medium CVE: [GHSA redacted] (mix.lock)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (lib/tesla/middleware/sse.ex)
  • Outdated: castore

New (21)

  • Edited copies of one member (3 members, 3+ corresponding lines) (lib/tesla/adapter/gun.ex)
  • Edited copies of one member (3 members, 5+ corresponding lines) (lib/tesla/middleware/form_urlencoded.ex)
  • Edited copy of a member (1 corresponding lines) (lib/tesla/middleware/form_urlencoded.ex)
  • Edited copy of a member (11 corresponding lines) (lib/tesla/middleware/compression.ex)
  • Edited copy of a member (16 corresponding lines) (lib/tesla/adapter/gun.ex)
  • Edited copy of a member (18 corresponding lines) (lib/tesla/open_api/cookie_param.ex)
  • Edited copy of a member (2 corresponding lines) (lib/tesla/adapter/gun.ex)
  • Edited copy of a member (2 corresponding lines) (lib/tesla/adapter/gun.ex)
  • Edited copy of a member (3 corresponding lines) (lib/tesla/adapter/ibrowse.ex)
  • Edited copy of a member (4 corresponding lines) (lib/tesla/middleware/json.ex)
  • Edited copy of a member (9 corresponding lines) (lib/tesla/open_api/header_param.ex)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • Off-boarding risk: anonymized user #1
  • Outdated: cowlib
  • Outdated: dialyxir
  • Outdated: gun
  • Outdated: hackney
  • Outdated: httparrot
  • Outdated: ranch
  • Repeated repair: lib/tesla/middleware/sse.ex (lib/tesla/middleware/sse.ex)
  • …and 1 more

Changes since last survey

  • 24 commits — 8 feature/other, 16 fixes

By area

  • lib/tesla — 18 commits
  • (root) — 4 commits
  • test/support — 1 commit
  • test/tesla — 1 commit

Notable commits

  • fix: fix(follow-redirects): drop the request body on 303 and keep HEAD (#953)
  • fix: fix(mint): stop the unsupported scheme test from counting every atom in the VM (#974)
  • fix: fix(sse): apply a retry field before its block is dispatched (#968)
  • fix: fix(sse): bound reconnects that yield no events (#963)
  • fix: fix(sse): bound the server retry with a max_delay option (#966)
  • fix: fix(sse): close a reconnecting body once when reading it fails (#969)
  • fix: fix(sse): close the body of a rejected reconnection response (#965)
  • fix: fix(sse): fail when a reconnecting body is enumerated twice (#970)
  • fix: fix(sse): follow the event stream interpretation rules (#955)
  • fix: fix(sse): parse fields without a space after the colon instead of raising (#954)
  • fix: fix(sse): raise Tesla.Error from failed Mint and Gun body streams (#960)
  • fix: fix(sse): raise a read timeout instead of reconnecting (#961)
  • fix: fix(sse): raise when the reconnecting stream gives up (#964)
  • fix: fix(sse): reconnect only GET requests (#962)
  • fix: fix(sse): seed the reconnect id from the request header (#967)
  • fix: fix(sse): validate reconnect options before the request runs (#959)
  • change: chore(deps): bump hackney from 4.8.6 to 4.9.1 in the prod group (#975)
  • change: chore(deps): bump the prod group with 2 updates (#973)
  • change: chore(master): release 1.23.0 (#952)
  • change: chore(master): release 1.23.0 (#976)
  • …and 4 more

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

Survey your own repository

elixir-tesla/tesla 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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5c300ecdad46d0d8f859218cc715c8aedbcc53c2 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.