Skip to content

Releases: hra42/openrouter-go

v1.8.1

07 Jun 23:32
Immutable release. Only release title and notes can be modified.
b49f991

Choose a tag to compare

What's Changed

  • fix cost tracking

Full Changelog: v1.7.0...v1.8.1

v1.8.0

07 Jun 20:01
Immutable release. Only release title and notes can be modified.
faa2483

Choose a tag to compare

What's Changed

  • feat: add cost tracking to chat and completion responses by @hra42 in #68

Full Changelog: v1.7.0...v1.8.0

v1.7.0 — TTS, videos, workspaces, org members

24 Apr 18:45
Immutable release. Only release title and notes can be modified.
e697fa0

Choose a tag to compare

New endpoints across the SDK, plus two small fixes. Backwards-compatible — no breaking changes.

✨ New endpoints

Text-to-speech

  • CreateSpeech(ctx, input, model, voice, ...opts) — synthesize audio via /audio/speech. Returns raw mp3 or pcm bytes you can write straight to disk. Options: WithSpeechResponseFormat, WithSpeechSpeed, WithSpeechProviderOptions.
  • Recipe: docs/recipes/tts.md · Example: examples/tts/

Video generation

  • CreateVideo (submit) → GetVideo (poll) → GetVideoContent (download bytes). Async job model with terminal statuses completed / failed / cancelled / expired.
  • ListVideoModels exposes per-model capabilities (supported aspect ratios, resolutions, durations, passthrough parameters).
  • Options: WithVideoAspectRatio, WithVideoResolution, WithVideoSize, WithVideoDuration, WithVideoSeed, WithVideoGenerateAudio, WithVideoFrameImages, WithVideoInputReferences, WithVideoCallbackURL, WithVideoProviderOptions.
  • Recipe: docs/recipes/videos.md · Example: examples/videos/

Workspaces (Management API)

  • ListWorkspaces, CreateWorkspace, GetWorkspace, UpdateWorkspace, DeleteWorkspace — all accept UUID or slug.
  • AddWorkspaceMembers / RemoveWorkspaceMembers for bulk member management. Requires a Provisioning (Management) API key.
  • Recipe: docs/recipes/workspaces.md · Example: examples/workspaces/

Organization members

🐛 Fixes

  • ZDR pricing discount now decodes as a number (previously failed for endpoints that returned numeric discount values).
  • OAuth: removed the phantom CreateAuthCode method that was never backed by a real endpoint. The working PKCE helper is ExchangeAuthCode.

📚 Docs

  • New recipes under docs/recipes/ for workspaces, videos, organization members, and guardrails.
  • AGENTS.md endpoint dispatch table extended with the new surface so AI coding agents can discover them.

🔗 Links

Full changelog: v1.6.1...v1.7.0

v1.6.1 — Agent-friendly docs + documentation site

23 Apr 19:35
Immutable release. Only release title and notes can be modified.
038a134

Choose a tag to compare

No library code changes — this is a documentation and tooling release. Upgrade is safe; no breaking changes, no behavior changes.

✨ Highlights

  • 🌐 New docs site: openrouter-go.hra42.lol — landing page, recipe sidebar, built from docs/ so there's a single source of truth.
  • 🤖 AGENTS.md — SDK conventions, streaming contract, endpoint decision table, common pitfalls. The file AI coding agents (Claude Code, Cursor, etc.) should read first when building on top of the SDK.
  • 📇 llms.txt — curated task → file index for LLM-driven discovery.
  • 📖 Package-level godocdoc.go gives pkg.go.dev and local go doc a proper overview instead of a bare symbol list.

📚 New docs under docs/

  • 21 task-indexed recipes under docs/recipes/: getting started, streaming, tool calling, structured output, MCP conversion, web search, image/audio/PDF/text-file inputs, embeddings, rerank, Responses API (beta), transforms, provider preferences, errors, app attribution, broadcast webhooks, account & keys, model discovery, OAuth PKCE.
  • docs/api-surface.json — machine-readable snapshot of the public API (187 types, 258 funcs). Agents and doc tooling can answer "does this SDK have X?" with one file read instead of grepping.

🛠️ Tooling

  • cmd/gen-api-surface — walks the package via go/doc and regenerates docs/api-surface.json. CI now fails if the snapshot is stale, so public-API changes can't ship without refreshing it.
  • Deploy workflow.github/workflows/deploy-docs.yml publishes the Docusaurus site to the custom domain on pushes to main that touch docs/** or website/**.

📦 Module hygiene

  • website/ is now a nested Go module (empty website/go.mod), so the Docusaurus scaffold (~2MB of JS/CSS) is excluded from the Go module tarball. Downstream go get stays lean — you only get Go files, markdown docs, and the machine-readable API snapshot.

🔗 Links

Full changelog: v1.6.0...v1.6.1

v1.6.0: Rerank API Support

06 Apr 21:54
Immutable release. Only release title and notes can be modified.
e3f47f9

Choose a tag to compare

🚀 Features

  • Rerank API Support: Added full support for OpenRouter's Rerank API, allowing for more relevant search and retrieval results. (#58)

🔗 Links

Full Changelog: v1.5.2...v1.6.0

v1.5.1

01 Mar 01:21
7462fc2

Choose a tag to compare

Support both string and number formats for OTLP ints for Broadcast Feature

Updates the OTLP any-value unmarshaling to handle integer values provided as either JSON strings or JSON numbers. This improves compatibility with various OTLP export implementations that may deviate from the canonical string-only representation for 64-bit integers.

Includes a new FlexInt type to manage polymorphic decoding while maintaining a consistent internal string representation for downstream processing.

Full Changelog: v1.5.0...v1.5.1

v1.5.0

26 Feb 20:43
ebab611

Choose a tag to compare

What's Changed

  • Add Claude Code GitHub Workflow by @hra42 in #50
  • Adds Broadcast webhook utilities and OTLP parsing by @hra42 in #51
  • Implements Anthropic Messages API support by @hra42 in #52
  • Enforces linting and resolves unhandled errors by @hra42 in #53
  • Implement Guardrails API support by @hra42 in #54
  • Add Guardrails API, ZDR endpoints, and user models by @hra42 in #55
  • Implements OAuth PKCE authentication support by @hra42 in #56
  • Go 1.26 Upgrade by @hra42 in #57

Full Changelog: v1.4.1...v1.5.0

v1.4.2

23 Jan 09:07

Choose a tag to compare

What's Changed

Full Changelog: v1.4.0...v1.4.2

v1.4.1

15 Jan 02:55

Choose a tag to compare

What's Changed

Full Changelog: v1.4.0...v1.4.1

v1.4.0

12 Jan 01:03
0537d9c

Choose a tag to compare

What's Changed

  • Implements Responses API support by @hra42 in #46
  • Refactors Responses API to use flat tool structure by @hra42 in #47

Full Changelog: v1.3.1...v1.4.0