Skip to content

feat(ai-sdk): export GoogleCacheRegistry + eval fixtures helpers (#46)#47

Merged
suleimansh merged 1 commit into
mainfrom
feat/ai-sdk-export-cache-registry-eval-helpers
Jun 26, 2026
Merged

feat(ai-sdk): export GoogleCacheRegistry + eval fixtures helpers (#46)#47
suleimansh merged 1 commit into
mainfrom
feat/ai-sdk-export-cache-registry-eval-helpers

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #46.

Why

Relocating the /server provider (#39) and the ai-eval CLI command (part of #40) to @rudderjs/ai is blocked because the code they move imports gemstack-internal symbols that are not on any public entry, so the inline can't compile against a published @gemstack/ai-sdk:

  • /server's AiProvider constructs GoogleCacheRegistry (a runtime class) and wires the app cache into it. A class can't be re-created on the consumer side.
  • commands/ai-eval imports defaultFixturesDir / readFixture / writeFixture; the ./eval subpath only re-exported stepsFromResponse + the EvalFixture type.

What

Purely additive (minor):

  • Export GoogleCacheRegistry + GoogleCacheRegistryOptions + CacheStoreLike from the main entry. A binding constructs it with its own CacheAdapter: new GoogleCacheRegistry({ store }).
  • Export defaultFixturesDir, readFixture, writeFixture from ./eval.

No behavior change, no new dependency. Build green, all 905 tests pass.

Sequencing

This publishes first, then Rudder inlines /server + make:agent + ai-eval (#39 / #40), then gemstack removes those subpaths + drops the @rudderjs/core / @rudderjs/console peers (#41) - the 3-release sequence noted in the epic (#35).

Surface the gemstack-internal symbols that the /server provider and
ai-eval CLI relocations (#39, #40) need to compile against a published
@gemstack/ai-sdk:

- GoogleCacheRegistry + GoogleCacheRegistryOptions + CacheStoreLike from
  the main entry, so a binding can construct the Gemini context-cache
  registry with its own CacheAdapter.
- defaultFixturesDir / readFixture / writeFixture from the ./eval
  subpath, so an ai-eval binding can read/write recorded fixtures.

Purely additive (minor). Prereq for #39 and the ai-eval part of #40.
@suleimansh suleimansh added the enhancement New feature or request label Jun 26, 2026
@suleimansh suleimansh self-assigned this Jun 26, 2026
@suleimansh suleimansh merged commit cf28664 into main Jun 26, 2026
1 check passed
@suleimansh suleimansh deleted the feat/ai-sdk-export-cache-registry-eval-helpers branch June 26, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ai-sdk: export GoogleCacheRegistry + eval fixtures helpers (prereq for #39 + ai-eval relocation)

1 participant