feat: add OpenAI embedding model support via Foundry embeddings proxy - #44
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
anandpant
force-pushed
the
feat/openai-embeddings
branch
from
July 12, 2026 00:03
c027750 to
fcb4bfc
Compare
4 tasks
anandpant
added a commit
that referenced
this pull request
Jul 12, 2026
…us-4.7/4.8, gemini-3.5-flash Adds exactly six new language-model catalog entries, all RIDs live-confirmed against the Foundry proxy: - OpenAI: gpt-5.5 (full chat+responses transport, modeled after gpt-5.4), gpt-5-pro (Responses-API-only reasoning tier), gpt-5.3-codex (Responses-API-only, succeeds gpt-5.1-codex directly) - Anthropic: claude-opus-4.7, claude-opus-4.8 (version-first RID slug order, modeled after claude-opus-4.6) - Google: gemini-3.5-flash (modeled after the gemini-3.x family) Explicitly excludes gpt-5.1-codex-max and gpt-5.2-codex, deprecated by the Foundry proxy as of 2026-07-09. RID/modelIdentifier/displayName/alias values are authoritative (live-confirmed by the team). lifecycle, trainingCutoffDate, performance tier, and externalUrl were pattern-matched against each model's nearest sibling in the same provider family. Adds catalog.test.ts spot-checks for the new models plus a negative-space check that the two excluded codex RIDs remain unknown. Updates model-support.md's known-alias lists and notes that gpt-5-pro/gpt-5.3-codex are Responses-API-only, consistent with this package's existing OpenAI Responses-only transport. No embedding entries touched (those are complete in the base branch, PR #44). Verification: pnpm run format, and nx run-many -t identity-check release-policy-check lint test typecheck build skills-validate package-audit --projects=foundry-ai all pass (54/54 package tests).
anandpant
added a commit
that referenced
this pull request
Jul 12, 2026
…us-4.7/4.8, gemini-3.5-flash Adds exactly six new language-model catalog entries, all RIDs live-confirmed against the Foundry proxy: - OpenAI: gpt-5.5 (full chat+responses transport, modeled after gpt-5.4), gpt-5-pro (Responses-API-only reasoning tier), gpt-5.3-codex (Responses-API-only, succeeds gpt-5.1-codex directly) - Anthropic: claude-opus-4.7, claude-opus-4.8 (version-first RID slug order, modeled after claude-opus-4.6) - Google: gemini-3.5-flash (modeled after the gemini-3.x family) Explicitly excludes gpt-5.1-codex-max and gpt-5.2-codex, deprecated by the Foundry proxy as of 2026-07-09. RID/modelIdentifier/displayName/alias values are authoritative (live-confirmed by the team). lifecycle, trainingCutoffDate, performance tier, and externalUrl were pattern-matched against each model's nearest sibling in the same provider family. Adds catalog.test.ts spot-checks for the new models plus a negative-space check that the two excluded codex RIDs remain unknown. Updates model-support.md's known-alias lists and notes that gpt-5-pro/gpt-5.3-codex are Responses-API-only, consistent with this package's existing OpenAI Responses-only transport. No embedding entries touched (those are complete in the base branch, PR #44). Verification: pnpm run format, and nx run-many -t identity-check release-policy-check lint test typecheck build skills-validate package-audit --projects=foundry-ai all pass (54/54 package tests).
anandpant
force-pushed
the
feat/foundry-trace-context
branch
from
July 12, 2026 22:14
e49af23 to
0429b4c
Compare
anandpant
force-pushed
the
feat/openai-embeddings
branch
from
July 12, 2026 22:14
fcb4bfc to
70e7bc0
Compare
Contributor
Author
This was referenced Jul 12, 2026
Contributor
Author
anandpant
changed the base branch from
feat/foundry-trace-context
to
graphite-base/44
July 12, 2026 22:20
…ead of RIDs A live probe against the Foundry embeddings proxy confirmed it takes a plain OpenAI model string in the request body (e.g. "text-embedding-3-small"), not a Foundry RID like the language-model endpoints. Unlike language models, the embeddings proxy has no RID concept: known aliases now resolve to themselves and any other model string passes through unchanged, mirroring the spirit of raw-RID passthrough on the language-model path.
anandpant
force-pushed
the
feat/openai-embeddings
branch
from
July 12, 2026 22:22
70e7bc0 to
f937805
Compare
anandpant
added a commit
that referenced
this pull request
Jul 12, 2026
…us-4.7/4.8, gemini-3.5-flash Adds exactly six new language-model catalog entries, all RIDs live-confirmed against the Foundry proxy: - OpenAI: gpt-5.5 (full chat+responses transport, modeled after gpt-5.4), gpt-5-pro (Responses-API-only reasoning tier), gpt-5.3-codex (Responses-API-only, succeeds gpt-5.1-codex directly) - Anthropic: claude-opus-4.7, claude-opus-4.8 (version-first RID slug order, modeled after claude-opus-4.6) - Google: gemini-3.5-flash (modeled after the gemini-3.x family) Explicitly excludes gpt-5.1-codex-max and gpt-5.2-codex, deprecated by the Foundry proxy as of 2026-07-09. RID/modelIdentifier/displayName/alias values are authoritative (live-confirmed by the team). lifecycle, trainingCutoffDate, performance tier, and externalUrl were pattern-matched against each model's nearest sibling in the same provider family. Adds catalog.test.ts spot-checks for the new models plus a negative-space check that the two excluded codex RIDs remain unknown. Updates model-support.md's known-alias lists and notes that gpt-5-pro/gpt-5.3-codex are Responses-API-only, consistent with this package's existing OpenAI Responses-only transport. No embedding entries touched (those are complete in the base branch, PR #44). Verification: pnpm run format, and nx run-many -t identity-check release-policy-check lint test typecheck build skills-validate package-audit --projects=foundry-ai all pass (54/54 package tests).
anandpant
added a commit
that referenced
this pull request
Jul 12, 2026
…us-4.7/4.8, gemini-3.5-flash (#45) ## Summary Stacks on #44. Adds exactly six new language-model catalog entries, all RIDs live-confirmed against the Foundry proxy per the team's RID probe: - **OpenAI**: `gpt-5.5` (full chat+responses transport, modeled after `gpt-5.4`), `gpt-5-pro` (Responses-API-only reasoning tier), `gpt-5.3-codex` (Responses-API-only, succeeds `gpt-5.1-codex` directly) - **Anthropic**: `claude-opus-4.7`, `claude-opus-4.8` (version-first RID slug order — `anthropic-claude-4-7-opus` / `anthropic-claude-4-8-opus` — confirmed live) - **Google**: `gemini-3.5-flash` (live-confirmed via SDK path) Explicitly **excludes** `gpt-5.1-codex-max` and `gpt-5.2-codex`, deprecated by the Foundry proxy as of 2026-07-09 (confirmed via proxy error). RID / `modelIdentifier` / `displayName` / alias values are authoritative (live-confirmed by the team, not guessed). `lifecycle`, `trainingCutoffDate`, `performance` tier, and `externalUrl` were pattern-matched against each model's nearest sibling in the same provider family, since those fields are informational/display-only and not independently verifiable the same way RIDs are. No embedding entries touched — that work is complete in the base branch (#44), which already routes embeddings via plain model-string passthrough rather than RID resolution. ## Changes - `packages/foundry-ai/src/models/openai-models.ts`: 3 new entries - `packages/foundry-ai/src/models/anthropic-models.ts`: 2 new entries - `packages/foundry-ai/src/models/google-models.ts`: 1 new entry - `packages/foundry-ai/src/__tests__/catalog.test.ts`: spot-checks for the new models across all three providers, plus a negative-space check confirming the two excluded/deprecated codex RIDs remain unknown - `packages/foundry-ai/docs/model-support.md`: known-alias lists updated, plus a note that `gpt-5-pro`/`gpt-5.3-codex` are Responses-API-only, consistent with this package's existing OpenAI Responses-only transport ## Test plan - [x] `pnpm run format` — passes (only the pre-existing, unrelated biome schema-version notice) - [x] `pnpm exec nx run-many -t identity-check release-policy-check lint test typecheck build skills-validate package-audit --projects=foundry-ai --outputStyle=static --skip-nx-cache` — all 8 targets pass - [x] Full package test suite: 54/54 tests pass (7 test files) - [x] Manually diffed every new catalog entry against the exact RID/alias mappings before committing
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.

Summary
embeddingModel()/embedding()support to the Foundry OpenAI provider, backed by@ai-sdk/openai's embedding surface pointed at Foundry's OpenAI embeddings proxy (/api/v2/llm/proxy/openai/v1/embeddings), reusing the existing auth/attribution/trace-context header assembly.text-embedding-3-smallandtext-embedding-3-largeas typed convenience aliases. Unlike the language-model endpoints, the embeddings proxy takes a plain OpenAI model string in the request body, not a Foundry RID. Known aliases resolve to themselves; any other model string passes through unchanged, mirroring the spirit of raw-RID passthrough on the language-model path.embeddingModel()continue to throwNoSuchModelError(Foundry only documents the OpenAI embeddings proxy).OpenAIEmbeddingModelId/KnownOpenAIEmbeddingModelId/OPENAI_EMBEDDING_MODEL_IDS/OPENAI_EMBEDDING_MODELSfrom the root entrypoint, additive only.docs/SPEC.md,packages/foundry-ai/docs/model-support.md,usage.md, READMEs, skill references) to reflect embeddings support and add anembed/embedManyusage example.openai.embeddingModel(...)) instead of a standalone direct client.Stacked on #43 (
feat/foundry-trace-context).Note: the branch initially shipped with alias->RID resolution for embeddings (mirroring the language-model pattern). A live probe against the real Foundry embeddings proxy showed that model routing is plain-string-only for embeddings (RIDs 404, plain strings 200), so a follow-up commit (
c027750) corrected this before review.Test plan
pnpm run formatpnpm exec nx run-many -t identity-check release-policy-check lint test typecheck build skills-validate package-audit --projects=foundry-ai --outputStyle=static --skip-nx-cache— all 8 targets pass (54/54 unit tests)embed()against the real Foundry proxy for bothtext-embedding-3-small(1536 dims) andtext-embedding-3-large(3072 dims) — both return HTTP 200 with real vectors after the plain-model-string fix.