Repository navigation
feat: vet OpenRouter as a second BYOK embedding provider - #142
Open
EthanThatOneKid wants to merge 1 commit into
Open
EthanThatOneKid wants to merge 1 commit into
EthanThatOneKid wants to merge 1 commit into
Conversation
A namespace now holds one credential per provider; a world's model picks the
provider. Adds openrouter/openai/text-embedding-3-{small,large}, a per-provider
endpoint table, a per-provider key cache and revoke scope, and an optional
?provider= on GET/DELETE embedding-credential (required once two are live).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
BYOK was hard-wired to OpenAI. This makes the provider a property of the model and adds OpenRouter as a vetted second provider.
catalog.ts: provider table (EMBEDDING_PROVIDERS, fixed endpoint per provider, still no customer-supplied host); new modelsopenrouter/openai/text-embedding-3-smalland-large(dimensions pinned to 1536).openai.tsbecomesprovider.ts; the client picks its endpoint from the model's provider.GET/DELETE /namespaces/{ns}/embedding-credentialtake an optional?provider=. It may be omitted while one live credential exists (existing callers keep working); with two live credentials it returns 400 untilprovideris given.store.tsno longer hard-codesprovider = 'openai'.Contract change and dependents
Additive OpenAPI change: new
providerandembeddingModelenum values, new optional query parameter, new 400 on GET/DELETE.Dependents, in merge order: this PR ->
worlds-client-ts(regenerate and publish) ->wazoo-apiround-trip script (add a provider switch) ->wazoo-consoleif it lists providers.Not observed
Tests use a fake
fetch; I have not called OpenRouter. The OpenRouter embeddings endpoint is OpenAI-format and its model list includesopenai/text-embedding-3-small/large, but thatdimensions: 1536is honoured through OpenRouter is unverified until the QA round-trip runs with a real OpenRouter key.Checks
230 tests pass (new: OpenRouter client, per-provider keys and cache, scoped revoke, ambiguous GET/DELETE, PATCH needs the model's provider credential),
tsc, prettier, OpenAPI snapshot regenerated.🤖 Generated with Claude Code