Skip to content

Suprnova v4.6.2

Latest

Choose a tag to compare

@eas4ai eas4ai released this 23 Oct 14:28
· 67 commits to main since this release

Added

  • HttpEmbedder reports the usage its provider sends. Embedder gains
    embed_documents_metered and embed_query_metered, which return the vectors
    with the provider's own usage (prompt_tokens, total_tokens) as a
    Metered<T>; the HTTP provider reads it from the OpenAI-compatible response
    and sums it across batches, and every other provider reports None, so an
    application that pays per token settles the bill from the provider's count
    instead of an estimate (#212).
  • HttpEmbedder runs over an application-owned transport.
    HttpEmbedder::with_transport takes an EmbeddingTransport: the application
    sends each TransportRequest (the pinned endpoint, headers, JSON body,
    timeout and response cap) through its own HTTP client, credential resolver
    and admission rules and returns a TransportResponse with the status,
    headers and body. The embedding protocol, retries, Retry-After, parsing and
    vector validation stay in the framework, which also refuses a body over the
    cap whatever the transport did (#213).
  • LazyEmbedder registers a shipped profile and loads the model on first
    use.
    SearchRegistry::register_embedder can take a LazyEmbedder built
    from a shipped ModelProfile and a loader; the service starts and tests run
    without downloading weights. The generation coordinator calls the new
    Embedder::resolve_profile before it pins a generation, so the generation
    still records the loaded model's revision, and a loaded model whose id or
    dimensions differ from the shipped profile is refused by name (#214).
  • A search generation an interrupted build left behind can be reclaimed.
    generations::reclaim_generation(index, generation) and search:reclaim
    release the creation lease of a creating generation so the next create
    call resumes at once instead of waiting the 60-second lease out, publish a
    building generation that was never switched to, and report one that is
    already current. The caller vouches for exclusive ownership, such as its own
    migration lock; SearchEngine::release_creation_lease is the driver hook,
    a no-op for drivers without leases (#215).
  • A Cloudflare CDN driver for static publication. CloudflareDriver
    (feature cdn-cloudflare, on by default and free of new dependencies) works
    the way an R2 bucket with a custom domain already does: the bucket is the
    publication disk through S3Config with the R2 endpoint, the custom domain
    serves it, and nothing runs at the edge. The driver owns a few rules on the
    zone, created on the first switch and corrected on every later one: two URL
    rewrites that serve /about and /about/ from the mirrored
    about/index.html, a response header rule that carries the published
    headers, and a cache rule that caches a response only when its own
    Cache-Control allows a shared cache, as the published objects' does. It
    purges by URL in batches of 100 or by prefix, and removes
    its rules on a first-publication rollback. CloudflareDriver::for_origin
    covers a hostname that mixes dynamic pages: the proxied application serves
    the published objects itself and the driver keeps the cache rule and the
    purges. R2 charges no egress.
  • An application's own 5xx page is sent as built. With debug off, the
    framework answered every browser 5xx with its minimal status-only view,
    which also replaced a 503 page the application built on purpose, with its
    recovery link and Content-Security-Policy. HttpResponse::error_view()
    marks such a response as the application's own error view, and the
    production view leaves it alone, body and headers. Unmarked 5xx responses
    keep the minimal view; with debug on the development error page still
    replaces a marked response that carries an error report (#217).

Known issue

CloudflareDriver::new, the R2 custom domain mode, serves nothing in this tag: the publisher writes the stable copies the domain serves only when no CDN driver is installed. Fixed on main in 232dda7 (CdnDriver::serves_mirror), which the next release carries. CloudflareDriver::for_origin and the CloudFront driver are not affected.