Files
supabase/apps/docs/components/Navigation/NavigationMenu
9084e8181b docs(ai): add Fireworks AI integration guide (#52193)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

**New docs page: Fireworks AI integration guide.** This adds
`guides/ai/integrations/fireworks-ai` and covers two tasks. The first
calls a Fireworks chat model from an Edge Function. The second stores
Fireworks embeddings in a pgvector table and searches them from an Edge
Function. Fireworks exposes an OpenAI-compatible API, so the page uses
the OpenAI SDK with a Fireworks base URL. That matches the existing
pattern in `guides/functions/ai-models`.

Base for this stacked PR:
https://github.com/supabase/supabase/pull/52246

## What is the current behavior?

- The docs have no Fireworks content. `git grep -i fireworks` across the
repo returns no docs, examples, or templates.

## What is the new behavior?

| File | Change |
| --- | --- |
| `apps/docs/content/guides/ai/integrations/fireworks-ai.mdx` | New
guide covering API key secrets, **Generate text**, and **Search with
embeddings** (table, RLS policy, HNSW index, `match_documents`, plus
embed and search functions) |
|
`apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts`
| Adds **Fireworks AI** under AI > Third-Party Tools, after Amazon
Bedrock |
| `apps/docs/content/guides/ai.mdx` | Adds a Fireworks AI card to the
Integrations grid |

## Additional context

- Worktree:
`~/GitHub/supabase/supabase-worktrees/docs/fireworks-ai-integration`
- Style: written against `apps/docs/style-guide/`, with a clean-context
critic pass. Placement and page shape follow
`guides/ai/integrations/amazon-bedrock.mdx`.
- Fireworks facts (base URL, `FIREWORKS_API_KEY`,
`accounts/fireworks/models/glm-5p3-flash`,
`fireworks/qwen3-embedding-8b`, the `dimensions` parameter, unnormalized
Qwen3 vectors) were checked against `docs.fireworks.ai` on 2026-10-22.

| Check | Result |
| --- | --- |
| Page SQL on `pgvector/pgvector:pg17` (extension, table, RLS policy,
HNSW index, `match_documents`) | Pass |
| `match_documents` called as `authenticated` with RLS on | Pass,
returns rows ranked by similarity |
| Prettier on all 3 files | Pass |
| Internal link targets exist | Pass (6 of 6) |
| Edge Functions against the live Fireworks API | **Not run**, no
Fireworks API key available |

### Needs review

- **Edge Function code is untested end to end.** It follows the
`withSupabase` and `jsr:@openai/openai@^6` patterns from
`guides/functions/auth` and `guides/functions/ai-models`, but nobody has
deployed it or called Fireworks with it yet.
- **Model choices are inferred.** `glm-5p3-flash` is the model in the
Fireworks quickstart. `qwen3-embedding-8b` is the serverless embedding
default their docs recommend. The 1,024 dimension is my pick: it stays
under the pgvector HNSW limit of 2,000 and is a supported Qwen3 output
size.
- **One page, two tasks.** The critic flagged
`03-page-structure.md#one-unit-per-page`. I kept a single page to match
the other integration pages in this folder. Splitting it is a reasonable
alternative.
- **Product owner sign-off.** No product spec exists for this page.
Scope (inference plus embeddings) is limited to features that have
already shipped.

### Proof: the guide renders on the preview and appears in the AI nav

**Verified:** `Vercel – docs` check (pass) · preview page returns 200 ·
Fireworks AI card links from `/docs/guides/ai` (pass)

[Fireworks AI guide (PR
preview)](https://docs-git-nikrichers-fireworks-ai-integration-supabase.vercel.app/docs/guides/ai/integrations/fireworks-ai)


![fireworks-ai-guide-after](https://moijyfpvgnmgoxvwcikq.supabase.co/storage/v1/object/public/pr-proof/supabase/supabase/pr52193/fireworks-ai-guide-after-b7b67965.png)

### Test plan

- [ ] Deploy `fireworks-chat`, `fireworks-embed`, and `fireworks-search`
with a real `FIREWORKS_API_KEY` and confirm each returns the documented
response
- [x] Confirm the page renders and appears under AI > Third-Party Tools
in the preview
- [x] Confirm the Fireworks AI card renders on `/docs/guides/ai`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordan Lee <jordan.lee@supabase.io>
2026-10-26 10:10:11 -07:00
..