Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/ai-sdk-export-cache-registry-eval-helpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gemstack/ai-sdk": minor
---

Export `GoogleCacheRegistry` (+ `GoogleCacheRegistryOptions` / `CacheStoreLike`) from the main entry, and `defaultFixturesDir` / `readFixture` / `writeFixture` from the `./eval` subpath.

These were gemstack-internal symbols that framework bindings could not reach against a published build. Surfacing them lets a binding construct the Gemini context-cache registry with its own `CacheAdapter` (`new GoogleCacheRegistry({ store })`) and lets an `ai:eval` CLI binding read/write recorded fixtures. Purely additive; unblocks relocating the `/server` provider and the `ai-eval` command to the Rudder side.
2 changes: 1 addition & 1 deletion packages/ai-sdk/src/eval/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { z } from 'zod'

export { reportJson } from './json-reporter.js'
export type { SuiteJson, SuiteJsonCase } from './json-reporter.js'
export { stepsFromResponse } from './fixtures.js'
export { stepsFromResponse, defaultFixturesDir, readFixture, writeFixture } from './fixtures.js'
export type { EvalFixture } from './fixtures.js'
export { reportHtml } from './html-reporter.js'
export type { HtmlReportOptions } from './html-reporter.js'
Expand Down
6 changes: 6 additions & 0 deletions packages/ai-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ export { AiRegistry } from './registry.js'
export { AnthropicProvider, type AnthropicConfig } from './providers/anthropic.js'
export { OpenAIProvider, OpenAIAdapter, type OpenAIConfig } from './providers/openai.js'
export { GoogleProvider, type GoogleConfig } from './providers/google.js'
// Google context-cache registry — the runtime class that backs Gemini's
// `cachedContent` resources. Exported so framework bindings can construct
// it with their own `CacheAdapter` (`new GoogleCacheRegistry({ store })`)
// and wire it into the Google provider.
export { GoogleCacheRegistry } from './providers/google-cache-registry.js'
export type { GoogleCacheRegistryOptions, CacheStoreLike } from './providers/google-cache-registry.js'
export { OllamaProvider, type OllamaConfig } from './providers/ollama.js'
export { DeepSeekProvider, type DeepSeekConfig } from './providers/deepseek.js'
export { XaiProvider, type XaiConfig } from './providers/xai.js'
Expand Down
Loading