mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Documents how to configure Headroom proxy with DeepSeek for OpenCode users. - No `headroom wrap` needed -- manual config avoids Claude/GPT model overwrites - Covers proxy setup, OpenCode provider config, output shaping, model comparison, and troubleshooting - Includes current DeepSeek V4 Pro and V4 Flash models, with deprecated alias guidance for `deepseek-chat` / `deepseek-reasoner` - Adds the guide to the published docs tree and navigation - All API keys use placeholders ## Description Adds documentation (`docs/content/docs/opencode-deepseek.mdx`) showing OpenCode users how to route through Headroom proxy with DeepSeek. Addresses the gap described in #78 (OpenCode integration docs) and provides the manual config workaround documented in #1679 (wrap broken with Go CLI). ## Type of Change - [x] Documentation update ## Changes Made - New docs page: `docs/content/docs/opencode-deepseek.mdx` -- step-by-step setup guide covering proxy launch, OpenCode provider config, output shaping, model comparison, thinking-mode notes, and troubleshooting - Updated `docs/content/docs/meta.json` so the guide appears under Integrations ## Testing - [ ] Unit tests pass (`pytest`) - [ ] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [ ] New tests added for new functionality - [x] Manual testing performed - [x] `git diff --check` - [x] `npm ci` in `docs/` - [ ] `npm run types:check` in `docs/` -- pre-existing failure in generated docs plumbing ### Test Output ```text git diff --check: passed (no trailing whitespace, no conflict markers) npm ci: installed in docs/ successfully npm run types:check: pre-existing failure in lib/source.ts(2,22) -- not introduced by this PR ``` ## Real Behavior Proof - Environment: Ubuntu, Python 3.13, headroom-ai 0.32.1, OpenCode (Go CLI) - Exact command / steps: Ran `headroom proxy --port 8787 --openai-api-url https://api.deepseek.com/v1`, configured OpenCode with `@ai-sdk/openai-compatible` pointing at `http://127.0.0.1:8787/v1`, sent chat completions through the proxy, verified compression on dashboard. - Observed result: proxy routes chat completions to DeepSeek, input compression active (SmartCrusher), output shaping (level 2) reduces response tokens by ~11%. Dashboard at http://127.0.0.1:8787/stats shows compressed requests and token savings (1075994 tokens saved across 675 requests). - Not tested: did not verify `docs/` static site build with `npm run build` in this environment (CI types:check failure exists on main before this PR). ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review --------- Co-authored-by: JerrettDavis <mxjerrett@gmail.com> |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| content/docs | ||
| lib | ||
| overrides | ||
| screenshots | ||
| .gitignore | ||
| bun.lock | ||
| claude-code-bedrock-headroom.md | ||
| context-mode-integration-analysis.md | ||
| next.config.mjs | ||
| observability.md | ||
| package-lock.json | ||
| package.json | ||
| platform-feature-matrix.json | ||
| platform-stabilization.md | ||
| postcss.config.mjs | ||
| proxy.ts | ||
| README.md | ||
| source.config.ts | ||
| tsconfig.json | ||
| vercel.json | ||
docs
This is a Next.js application generated with Create Fumadocs.
Run development server:
npm run dev
# or
pnpm dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
Explore
In the project, you can see:
lib/source.ts: Code for content source adapter,loader()provides the interface to access your content.lib/layout.shared.tsx: Shared options for layouts, optional but preferred to keep.
| Route | Description |
|---|---|
app/(home) |
The route group for your landing page and other pages. |
app/docs |
The documentation layout and pages. |
app/api/search/route.ts |
The Route Handler for search. |
Fumadocs MDX
A source.config.ts config file has been included, you can customise different options like frontmatter schema.
Read the Introduction for further details.
Learn More
To learn more about Next.js and Fumadocs, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Fumadocs - learn about Fumadocs