Skip to content

feat: add synthetic support#231

Draft
matthew-hre wants to merge 8 commits intomainfrom
feat/synthetic
Draft

feat: add synthetic support#231
matthew-hre wants to merge 8 commits intomainfrom
feat/synthetic

Conversation

@matthew-hre
Copy link
Copy Markdown
Collaborator

opening a pr so i can leave some comments on it

hqnna added 8 commits April 19, 2026 17:14
- Add 'synthetic' to ProviderType, ApiKeyProvider, and CLIENT_STORAGE_KEYS
- Add SYNTHETIC_API_KEY to server env schema
- Add synthetic utility model (GLM 4.7 Flash)
- Add GLM 4.7 Flash to tool model options
- Add 'glm-4.7-flash' to toolModelIds
Create synthetic.ts provider module using @ai-sdk/openai with
Synthetic's OpenAI-compatible base URL (https://api.synthetic.new/v1/).
- Add synthetic to DIRECT_PROVIDER_MAP for direct model routing
- Add synthetic to resolveUtilityProvider and resolveToolProvider
- Wire createSyntheticProvider/buildSyntheticProviderOptions in service
- Treat synthetic as a direct provider for PDF handling
- Skip reasoning stripping for synthetic (OpenAI-compatible API)
- Add syncSyntheticProviderAvailability() to cross-reference
  Synthetic's /v1/models endpoint with the local models table
- Wire into the cron sync-models route
- Match Synthetic hf: prefixed IDs against OpenRouter model slugs
- Add Synthetic to integrations tab with logo and API key config
- Include synthetic in all hasAnyChatKey checks across model hooks
- Add synthetic to direct provider detection for PDF handling
- Update API key status widget, prefetch, tools section, models tab
- Update warning badge text to mention Synthetic
- Skip Synthetic-sourced models during OpenRouter cleanup
- Insert Synthetic-only models (no OpenRouter equivalent) into models table
- Clean up stale Synthetic-only models removed from Synthetic catalog
- Add resolveProvider fallback for non-prefix-matched models (hf:org/Model)
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bobrchat Ready Ready Preview, Comment Apr 20, 2026 8:53pm

Request Review

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's some white in the middle of this SVG - we should clean that up

<AlertCircle className="text-warning mt-0.5 size-5 shrink-0" />
<div className="text-warning-foreground text-sm">
No API key configured. Set up an API key (OpenRouter, OpenAI, or Anthropic) in
No API key configured. Set up an API key (OpenRouter, OpenAI, Anthropic, or Synthetic) in
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to "(OpenRouter, OpenAI, Anthropic, etc.)" for the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants