Skip to content

chore(release): speed up releases and update roadmap#346

Merged
SantiagoDePolonia merged 6 commits into
mainfrom
chore/release-faster
May 22, 2026
Merged

chore(release): speed up releases and update roadmap#346
SantiagoDePolonia merged 6 commits into
mainfrom
chore/release-faster

Conversation

@SantiagoDePolonia

@SantiagoDePolonia SantiagoDePolonia commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Run GoReleaser as a draft release in parallel with Docker builds, then publish only after Docker tag promotion succeeds.
  • Mark completed 0.2.0 roadmap items in README and docs, including /messages support.
  • Add /v1/messages and /v1/messages/count_tokens to README, docs, and generated OpenAPI output.

Verification

  • make swagger
  • YAML parse check
  • jq empty docs/openapi.json
  • go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/release.yml
  • go run github.com/goreleaser/goreleaser/v2@latest check
  • go test -tags=swagger ./cmd/gomodel
  • git diff --check
  • pre-commit hooks during commit

Summary by CodeRabbit

  • New Features

    • Added Anthropic-compatible /v1/messages and /v1/messages/count_tokens endpoints
    • Added admin GET /admin/audit/detail endpoint
    • Extended usage logs with cache-related token metrics
  • Documentation

    • Updated API docs, OpenAPI/Swagger output, guardrails, caching, and failover docs to include Anthropic endpoints
    • Updated roadmap progress for 0.2.0
  • Chores

    • Release workflow now builds draft releases and adds a separate publish step

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Anthropic-compatible /v1/messages and /v1/messages/count_tokens endpoints and schemas, extends admin and usage metrics, updates generated OpenAPI/Swagger and docs, and changes the CI release workflow to build draft GitHub releases then publish them in a separate job.

Changes

Release Workflow

Layer / File(s) Summary
Two-stage release process
.github/workflows/release.yml, .goreleaser.yaml
GoReleaser job now builds draft releases with --draft; a new github-release job publishes the draft via gh release edit --draft=false --verify-tag after docker-promote and goreleaser. GoReleaser config adds release.replace_existing_draft: true.

Anthropic Messages API and Monitoring

Layer / File(s) Summary
API endpoints and schemas
docs/openapi.json, cmd/gomodel/docs/docs.go
Adds POST /v1/messages and POST /v1/messages/count_tokens plus comprehensive anthropicapi.* request/response/error/component schemas and updates Swagger/OpenAPI info.
Operational monitoring enhancements
docs/openapi.json, cmd/gomodel/docs/docs.go
Adds GET /admin/audit/detail with log_id, extends admin.DashboardConfigResponse with DASHBOARD_LIVE_LOGS_ENABLED, and augments usage.UsageLogEntry with cached/uncached token metrics.
Feature documentation updates
README.md, docs/about/roadmap.mdx, docs/advanced/guardrails.mdx, docs/features/cache.mdx, docs/features/failover.mdx
README adds "Anthropic-Compatible API" entries; roadmap checklist updated; guardrails, cache, and failover docs include /v1/messages.
Swagger post-processing & tooling
Makefile, tools/swagger-postprocess.mjs, tools/openapi-postprocess.mjs, cmd/gomodel/docs/docs.go
swagger target now checks for node and runs tools/swagger-postprocess.mjs; postprocessing scripts register anthropicapi.ContentBlock, add SSE schemas, rewire Anthropic-related schemas, and reserialize the generated docs.go template.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant GoModel
    participant Anthropic as Anthropic/Provider
    participant Audit as Audit/Usage Store

    Client->>GoModel: POST /v1/messages
    GoModel->>GoModel: validate & normalize (ContentBlock)
    GoModel->>Anthropic: forward translated request
    Anthropic-->>GoModel: stream/resp + token usage
    GoModel->>Audit: record usage (cached/uncached token fields)
    GoModel-->>Client: return anthropic-formatted response

    Client->>GoModel: GET /admin/audit/detail?log_id=X
    GoModel->>Audit: fetch audit entry
    Audit-->>GoModel: return audit details
    GoModel-->>Client: return audit entry
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

release:internal

"🐰 I hop through code and tidy the trail,
Drafting releases before I set sail.
Messages counted, audit logs sing,
Docs refreshed for the changes I bring.
GoModel grows — a careful, cozy tale."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main intent: speeding up releases (by making them draft) and updating the roadmap with completed items and new API documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-faster

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR speeds up releases and updates the public API docs. It changes:

  • Runs GoReleaser as a draft release while Docker images build and promotes the GitHub release after Docker tags publish.
  • Adds Anthropic-compatible /v1/messages and /v1/messages/count_tokens documentation.
  • Updates generated Swagger and OpenAPI schemas for the Anthropic message request and response shapes.
  • Updates roadmap and feature docs for guardrails, caching, failover, and completed roadmap items.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Reviews (2): Last reviewed commit: "docs: fix Anthropic messages OpenAPI sch..." | Re-trigger Greptile

Comment thread docs/openapi.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

226-246: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add /admin/audit/detail to the Admin Endpoints table.

This PR introduces that endpoint in the OpenAPI docs, but it is missing from README’s user-facing endpoint index.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 226 - 246, The README endpoints table is missing the
new admin endpoint /admin/audit/detail; add a table row for
`/admin/audit/detail` with the correct HTTP method (GET) and a short description
like "Detailed audit entry information" so the README matches the OpenAPI docs
and PR changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/gomodel/docs/docs.go`:
- Around line 4057-4061: The OpenAPI schema generation incorrectly emits arrays
of integers for several Anthropic fields; update the docs generation logic so
anthropicapi.Message.content is typed as either a string or an array of
content-block objects (not integer arrays), anthropicapi.MessagesRequest.system
is a string, anthropicapi.ResponseContentBlock.input is an object representing
tool arguments, and anthropicapi.Tool.input_schema is a JSON Schema object.
Locate the schema mappings that produce these entries (the generators that emit
types for Message.content, MessagesRequest.system, ResponseContentBlock.input,
and Tool.input_schema) and change their output types to the correct OpenAPI
schemas (string or array<object> for content, string for system, object for
input and input_schema) so the generated docs match Anthropic’s Message and
structured output shapes.

In `@docs/openapi.json`:
- Around line 4521-4672: The OpenAPI contract models several Anthropic payload
fields as integer[] (e.g., messages[].content, system, content[].input,
tools[].input_schema) which is incorrect; update the related schemas (look for
components/schemas used by the /v1/messages and /v1/messages/count_tokens
request/response refs such as anthropicapi.MessagesRequest, MessagesResponse,
CountTokensResponse and any nested message/content/tool schemas) to accept the
correct union types (string and block/text unions and/or arbitrary JSON objects
as appropriate) instead of integer[], then regenerate the docs so the published
spec serializes valid Anthropic payloads.

---

Outside diff comments:
In `@README.md`:
- Around line 226-246: The README endpoints table is missing the new admin
endpoint /admin/audit/detail; add a table row for `/admin/audit/detail` with the
correct HTTP method (GET) and a short description like "Detailed audit entry
information" so the README matches the OpenAPI docs and PR changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e116834a-3bb7-4150-b649-3048cd773387

📥 Commits

Reviewing files that changed from the base of the PR and between 05775df and 281fae6.

📒 Files selected for processing (9)
  • .github/workflows/release.yml
  • .goreleaser.yaml
  • README.md
  • cmd/gomodel/docs/docs.go
  • docs/about/roadmap.mdx
  • docs/advanced/guardrails.mdx
  • docs/features/cache.mdx
  • docs/features/failover.mdx
  • docs/openapi.json

Comment thread cmd/gomodel/docs/docs.go Outdated
Comment thread docs/openapi.json
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mintlify

mintlify Bot commented May 21, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
gomodel 🟢 Ready View Preview May 21, 2026, 6:11 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/openapi.json (1)

4539-4542: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix /v1/messages text/event-stream schema to match SSE event frames, not MessagesResponse.

docs/openapi.json maps the text/event-stream content type to #/components/schemas/anthropicapi.MessagesResponse, but Anthropic’s /v1/messages streaming uses named SSE event frames (e.g., message_start, content_block_start, content_block_delta, message_delta, message_stop) rather than repeating a Message(s)-shaped response object. This mismatch will mislead SDK/client generators about the actual wire format.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/openapi.json` around lines 4539 - 4542, The OpenAPI entry for the
/v1/messages response currently maps the text/event-stream content type to
components/schemas/anthropicapi.MessagesResponse, which is incorrect for
Anthropic SSE framing; update the spec so text/event-stream references a schema
that models named SSE event frames (e.g., an object/oneOf describing event types
like message_start, content_block_start, content_block_delta, message_delta,
message_stop) instead of anthropicapi.MessagesResponse. Concretely, replace the
text/event-stream schema reference to a new/reused schema such as
components/schemas/anthropicapi.SSEEventFrame (or an array/stream of such
frames) and add the corresponding event-type discriminated schema definitions so
generators will know the actual SSE frame shapes for /v1/messages.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/openapi.json`:
- Around line 8309-8311: The OpenAPI schema defines
anthropicapi.ContentBlock.source as only an object but needs to accept either a
string or an object; update the schema for the property named "source" under
anthropicapi.ContentBlock to allow both types (e.g., use oneOf/anyOf with a
string schema and an object schema that keeps additionalProperties: true) so
search_result blocks can be strings while image/document blocks remain
structured objects.

---

Outside diff comments:
In `@docs/openapi.json`:
- Around line 4539-4542: The OpenAPI entry for the /v1/messages response
currently maps the text/event-stream content type to
components/schemas/anthropicapi.MessagesResponse, which is incorrect for
Anthropic SSE framing; update the spec so text/event-stream references a schema
that models named SSE event frames (e.g., an object/oneOf describing event types
like message_start, content_block_start, content_block_delta, message_delta,
message_stop) instead of anthropicapi.MessagesResponse. Concretely, replace the
text/event-stream schema reference to a new/reused schema such as
components/schemas/anthropicapi.SSEEventFrame (or an array/stream of such
frames) and add the corresponding event-type discriminated schema definitions so
generators will know the actual SSE frame shapes for /v1/messages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 47abcae2-cadb-4651-82c3-c1632bfda8f7

📥 Commits

Reviewing files that changed from the base of the PR and between 281fae6 and ec0ff00.

📒 Files selected for processing (6)
  • Makefile
  • README.md
  • cmd/gomodel/docs/docs.go
  • docs/openapi.json
  • tools/openapi-postprocess.mjs
  • tools/swagger-postprocess.mjs

Comment thread docs/openapi.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/openapi-postprocess.mjs`:
- Around line 249-260: The current schemas["anthropicapi.SSEEventFrame"] oneOf
is closed to known event types and will reject unknown future SSE events; add a
generic fallback schema (e.g., components schema named
"anthropicapi.SSEUnknownEvent") and include it in the oneOf list after the
existing refs so validators/codegen will accept unknown event names; implement
the SSEUnknownEvent schema to minimally allow an "event" string and an open JSON
"data" object (additionalProperties: true) so unknown event frames are accepted
without breaking existing typed events; update any references or docs to mention
the fallback but keep the original specific event schemas unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8e30423d-5abd-469c-9b08-811e15e071ca

📥 Commits

Reviewing files that changed from the base of the PR and between cc23b0f and 10e997d.

📒 Files selected for processing (2)
  • docs/openapi.json
  • tools/openapi-postprocess.mjs

Comment thread tools/openapi-postprocess.mjs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tools/openapi-postprocess.mjs (1)

249-270: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix SSEEventFrame union so the unknown event fallback can’t swallow all known events

In tools/openapi-postprocess.mjs (lines 249-270), anthropicapi.SSEUnknownEvent matches any payload with a type, so with SSEEventFrame using anyOf, that branch overlaps every concrete event and degrades generated typings/type discrimination. Keep a discriminated oneOf for the known type values, and handle forward-compatible payloads via a separate catch-all (e.g., an outer anyOf wrapper) rather than relying on not-based exclusion in the fallback—complex not constraints are frequently unsupported/ignored by generators.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/openapi-postprocess.mjs` around lines 249 - 270, SSEEventFrame
currently uses anyOf with the catch-all SSEUnknownEvent which overlaps all
concrete event schemas; change SSEEventFrame so the known event branch is a
discriminated oneOf (use oneOf with a discriminator on "type" referencing the
concrete refs: SSEMessageStartEvent, SSEContentBlockStartEvent,
SSEContentBlockDeltaEvent, SSEContentBlockStopEvent, SSEMessageDeltaEvent,
SSEMessageStopEvent, SSEPingEvent, SSEErrorEvent) and then wrap that oneOf and
the catch-all SSEUnknownEvent in an outer anyOf (i.e., SSEEventFrame.anyOf = [ {
oneOf: [ <known refs> ], discriminator: { propertyName: "type" } }, { $ref:
"`#/components/schemas/anthropicapi.SSEUnknownEvent`" } ]) so generators can
discriminate known types while still allowing a forward-compatible fallback.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tools/openapi-postprocess.mjs`:
- Around line 249-270: SSEEventFrame currently uses anyOf with the catch-all
SSEUnknownEvent which overlaps all concrete event schemas; change SSEEventFrame
so the known event branch is a discriminated oneOf (use oneOf with a
discriminator on "type" referencing the concrete refs: SSEMessageStartEvent,
SSEContentBlockStartEvent, SSEContentBlockDeltaEvent, SSEContentBlockStopEvent,
SSEMessageDeltaEvent, SSEMessageStopEvent, SSEPingEvent, SSEErrorEvent) and then
wrap that oneOf and the catch-all SSEUnknownEvent in an outer anyOf (i.e.,
SSEEventFrame.anyOf = [ { oneOf: [ <known refs> ], discriminator: {
propertyName: "type" } }, { $ref:
"`#/components/schemas/anthropicapi.SSEUnknownEvent`" } ]) so generators can
discriminate known types while still allowing a forward-compatible fallback.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ca95d0f-c3d5-453f-9a54-211201bc5ea3

📥 Commits

Reviewing files that changed from the base of the PR and between 10e997d and 72df8aa.

📒 Files selected for processing (2)
  • docs/openapi.json
  • tools/openapi-postprocess.mjs

@SantiagoDePolonia SantiagoDePolonia merged commit f5abc10 into main May 22, 2026
18 checks passed
@SantiagoDePolonia SantiagoDePolonia deleted the chore/release-faster branch June 11, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants