Skip to content

Conversation

@voltagent-bot
Copy link
Member

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@voltagent/[email protected]

Patch Changes

  • #696 69bc5bf Thanks @fav-devs! - Add hostname configuration option to honoServer() to support IPv6 and dual-stack networking.

    The honoServer() function now accepts a hostname option that allows configuring which network interface the server binds to. This fixes deployment issues on platforms like Railway that require IPv6 binding for private networking.

    Example usage:

    import { honoServer } from "@voltagent/server-hono";
    
    new VoltAgent({
      agents,
      server: honoServer({
        port: 8080,
        hostname: "::", // Binds to IPv6/dual-stack
      }),
    });

    Options:

    • "0.0.0.0" - Binds to all IPv4 interfaces (default, maintains backward compatibility)
    • "::" - Binds to all IPv6 interfaces (dual-stack on most systems)
    • "localhost" or "127.0.0.1" - Only localhost access

    Fixes [BUG] honoServer() doesn't expose hostname configuration, breaking Railway IPv6 private networking #694

@voltagent/[email protected]

Patch Changes

  • #701 c4f01e6 Thanks @omeraplak! - fix: observability spans terminating prematurely on Vercel Edge and Deno Deploy

    The Problem

    Observability spans were being cut short on Vercel Edge and Deno Deploy runtimes because the toVercelEdge() and toDeno() adapters didn't implement waitUntil support. Unlike toCloudflareWorker(), which properly extracted and set up waitUntil from the execution context, these adapters would terminate async operations (like span exports) as soon as the response was returned.

    This caused the observability pipeline's FetchTraceExporter and FetchLogExporter to have their export promises cancelled mid-flight, resulting in incomplete or missing observability data.

    The Solution

    Refactored all serverless adapters to use a new withWaitUntil() helper utility that:

    • Extracts waitUntil from the runtime context (Cloudflare's executionCtx, Vercel's context, or Deno's info)
    • Sets it as globalThis.___voltagent_wait_until for the observability exporters to use
    • Returns a cleanup function that properly restores previous state
    • Handles errors gracefully and supports nested calls

    Now all three adapters (toCloudflareWorker, toVercelEdge, toDeno) use the same battle-tested pattern:

    const cleanup = withWaitUntil(context);
    try {
      return await processRequest(request);
    } finally {
      cleanup();
    }

    Impact

    • ✅ Observability spans now export successfully on Vercel Edge Runtime
    • ✅ Observability spans now export successfully on Deno Deploy
    • ✅ Consistent waitUntil behavior across all serverless platforms
    • ✅ DRY principle: eliminated duplicate code across adapters
    • ✅ Comprehensive test coverage with 11 unit tests covering edge cases, nested calls, and error scenarios

    Technical Details

    The fix introduces:

    • utils/wait-until-wrapper.ts: Reusable withWaitUntil() helper
    • utils/wait-until-wrapper.spec.ts: Complete test suite (11/11 passing)
    • Updated toCloudflareWorker(): Simplified using helper
    • Fixed toVercelEdge(): Now properly supports waitUntil
    • Fixed toDeno(): Now properly supports waitUntil

@joggrbot

This comment has been minimized.

@omeraplak omeraplak merged commit 8298f30 into main Oct 20, 2025
20 checks passed
@omeraplak omeraplak deleted the changeset-release/main branch October 20, 2025 16:15
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.

[BUG] honoServer() doesn't expose hostname configuration, breaking Railway IPv6 private networking

3 participants