Liking cljdoc? Tell your friends :D

Changelog

All notable user-visible changes are tracked here.

0.5.0

Breaking changes

This is not a drop-in upgrade from 0.4.x. The main SDK entry points and namespaced request keys remain, but callers must account for these changes:

  • Perplexity now uses the Agent API. Use native provider/model IDs such as perplexity/sonar and migrate Sonar-specific provider options.
  • OpenAI, OpenRouter, and Bedrock image generation require explicit :image/model; retired or implicit model defaults are no longer selected.
  • Usage may omit unreported input/output token counts. Transcription can report duration, and reranking can report :usage/search-units. Do not interpret missing counters or unknown costs as zero.
  • Accumulated streaming errors throw with :partial-response in exception data. Terminal events follow trailing metadata; premature EOF is incomplete.
  • Migrate persisted Gemini provider state to the appropriate :gemini-native or :vertex-gemini identity rather than the old :gemini tag.
  • Unsupported native content/reasoning combinations now fail explicitly. extra_body cannot override canonical model/messages/stream; Cohere and Voyage rerank documents must be strings; Mistral embeddings reject :embed/user. Bedrock pagination uses canonical :rerank/next-token.

Changed

  • Add the three scoped surfaces identified by the pinned litellm-clj comparison: Z.AI chat, native Gemini batch embeddings, and embeddings for caller-registered Azure OpenAI deployments, including explicit Azure v1 routing.

  • Refresh the bundled LiteLLM and models.dev catalogs and extend registry-backed pricing across reported text, image, audio, cache, duration, request, and rerank billing dimensions. Missing usage or rates remain unknown.

  • Add persistent Responses WebSockets for ChatGPT OAuth (:codex-backend) with :config {:transport :websocket}. HTTP/SSE remains the default: live gpt-6-astra / low-effort benchmarks favored SSE for first-output latency. WebSockets use the official streaming payload, isolated concurrent leases, bounded buffers, inactivity timeouts and explicit disposal. API-key providers are unchanged.

  • Automatically continue matching completed WebSocket conversations with previous_response_id and delta-only input. Prefer the correct cached connection; send full history after edits, configuration changes or reconnects. Recover a rejected automatic response ID once only before generation starts. Disable continuation with :config {:incremental? false}.

Fixed

  • Align provider request, response, streaming, usage, file-attachment, stop sequence, structured-error, and Cohere v2 embedding/rerank handling with the current provider wire shapes while preserving provider-native replay and typed output data.

  • Preserve response/parser-reported costs instead of overwriting them with estimates, and avoid inventing required token totals or substituting text-token rates for separately billed image and audio usage.

  • Deliver stream deltas without mapcat read-ahead that could block an event until additional provider data arrived.

  • Close streaming response bodies when an event callback throws.

  • Preserve Codex backend request rules for custom endpoint URLs, and apply configured headers to OAuth requests.

  • Preserve completed assistant message metadata for exact continuation without duplicating its canonical text or overriding user edits.

  • Use streamed completed output items when the backend's terminal output array is empty, preventing duplicate output in incremental requests.

  • Avoid redundant JSON serialization/deserialization when parsing buffered Codex responses.

0.4.5

Fixed

  • Emit exactly one terminal stream event while preserving the provider finish reason and adding a fallback terminal event only when the provider omits one.
  • Preserve user-only ChatGPT OAuth input when Codex backend instructions use the default, retain encrypted reasoning for replay, and report completed function calls with the canonical :tool-calls finish reason.

0.4.4

Changed

  • Rechecked all built-in providers against current official API schemas and aligned capabilities, model-listing claims, usage fields, media metadata, rerank results, and provider-specific response data.
  • Removed the unsupported Lambda hosted alias. No authoritative public schema exists for its configured endpoint. Custom OpenAI-compatible Lambda deployments remain available through provider registration.
  • Extended canonical schemas for nullable moderation categories, transcription language and log-probability data, video token usage, and returned rerank embeddings.

Fixed

  • Send required streaming flags for OpenAI Chat and Codex Responses, and normalize legacy OpenAI function calls in buffered and streamed responses.
  • Correct Anthropic system-message routing, beta headers, thinking signatures, and terminal SSE events for native and Vertex transports.
  • Preserve current OpenRouter reasoning and cost details, Perplexity citation metadata, Gemini image MIME types and reasoning usage, Bedrock pagination and response metadata, and non-float embedding payloads without false float coercion.
  • Align Groq and xAI reasoning requests, Kimi structured-output capabilities, ElevenLabs output formats, Volcengine model-listing behavior, and the Fake provider's deterministic chat-only capability.

0.3.4

Changed

  • Refreshed every built-in provider adapter against current official wire schemas, including request/response/stream parsing, usage and cost metadata, tools, structured output, reasoning, caching, media, citations, and reranking.
  • Migrated Cohere embedding and rerank to v2, Perplexity Sonar to /v1/sonar, OpenRouter image generation to /images, and Vertex image generation from discontinued Imagen endpoints to gemini-2.5-flash-image over generateContent.
  • Added dedicated OpenRouter, Voyage, and Jina embedding transports; refreshed OpenAI-compatible provider endpoints and capabilities from official sources.
  • Removed Kimi Code CLI identity spoofing. Third-party clients now send their own normal identity with Bearer authentication.
  • Refreshed the bundled LiteLLM model/pricing snapshot and filter discontinued Imagen model IDs from future refreshes.

Fixed

  • Preserve provider-reported streaming and image costs instead of replacing them with estimates.
  • Correct Anthropic cache-token accounting and retain current provider-native blocks rather than silently dropping unknown response content.

0.2.1

Added

  • Documented the :vertex-anthropic provider across the README supported-surface table, the provider matrix (doc/providers.md), the configuration guide (doc/provider-configuration.md), and the LiteLLM parity / shape-audit ledgers, including credentials, model ids, and the region-gating (HTTP 404) caveat.

0.2.0

Added

  • Added :vertex-anthropic, a provider that serves Anthropic's Claude models through Google Vertex AI. It reuses the native Anthropic Messages request body, response parser, and streaming parser, and swaps in Vertex-specific transport: the :rawPredict / :streamRawPredict endpoints with the model in the URL path, GCP OAuth bearer auth via the existing ADC chain (instead of x-api-key), and an anthropic_version body field. Authenticates with the same GCP credentials as :vertex-gemini. Thinking blocks, tool use, file/document attachments, and native cache markers behave as on :anthropic.
  • Added scripts/vertex_anthropic_smoke.clj, a live smoke script mirroring scripts/vertex_stream_smoke.clj.

0.1.0

First published release to Clojars as net.clojars.deadmeme5441/clojure-llm-sdk. Consume it with {:mvn/version "0.1.0"} instead of a git SHA.

Added

  • Published to Clojars with a tag-driven release workflow: pushing a v* tag builds, tests, and deploys the artifact automatically.
  • Replaced the LiteLLM snapshot refresh script's hardcoded local-checkout path with a direct HTTPS fetch of the upstream pricing file.
  • Added :kimi-code, an OpenAI Chat Completions compatible provider for Kimi Code at https://api.kimi.com/coding/v1.
  • Added proper public library docs for getting started, API reference, provider configuration, and model registry behavior.
  • Added GitHub CI for lint, unit tests, and jar build.
  • Added .env.example, contribution policy, security policy, issue templates, PR template, and Dependabot configuration.

Changed

  • Split Moonshot Kimi and Kimi Code credentials: :kimi now reads MOONSHOT_API_KEY; :kimi-code reads KIMI_API_KEY.
  • Added generated tool/cache ignore rules so local clj-kondo and LSP caches do not appear as candidate repo files.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close