Skip to content

feat(common): register FriendliAI model IDs and provider prefix - #1116

Closed
rekty wants to merge 8801 commits into
CodebuffAI:mainfrom
rekty:feat/friendli-model-ids
Closed

feat(common): register FriendliAI model IDs and provider prefix#1116
rekty wants to merge 8801 commits into
CodebuffAI:mainfrom
rekty:feat/friendli-model-ids

Conversation

@rekty

@rekty rekty commented Aug 25, 2026

Copy link
Copy Markdown

{
"title": "feat(common): register FriendliAI model IDs and provider prefix",
"head": "rekty:feat/friendli-model-ids",
"base": "main",
"body": "Closes #1089\n\nFriendliAI serves several models already present in the catalog under other providers. Registering their exact HuggingFace-cased IDs under a friendli/ prefix means a maintainer can route them through the private backend (web/src/llm-api/) with no further public changes.\n\n### What this does\n\n- Adds friendli to ALLOWED_MODEL_PREFIXES so the new IDs pass isExplicitlyDefinedModel() and agent-template validation.\n- Introduces a friendliModels map with two serverless models (GLM-5.2, MiniMax-M2.5) and spreads it into the canonical models object.\n- Adds friendli.ai to providerDomains and a friendli/ prefix check in getLogoForModel so the favicon resolver picks up the right domain.\n\n### What a maintainer port would need to do next\n\nAll inference routing lives behind the private web/src/llm-api/ boundary. The pieces a matching routing file would need:\n\n| Detail | Value |\n|---|---|\n| Endpoint | https://api.friendli.ai/serverless/v1/chat/completions |\n| Auth | Bearer <token> + optional X-Friendli-Team |\n| Metadata | GET .../serverless/v1/models |\n| Reasoning | boolean parse_reasoning / include_reasoning, chat_template_kwargs.enable_thinking; response field reasoning_content (not thinking block) |\n| Incompatibility | response_format + tools together returns 422 |\n| IDs | Case-sensitive exact HuggingFace casing |\n\nTests:\n- bun test common/src/__tests__/model-config.test.ts — 7 pass\n- bun test common/src/__tests__/freebuff-peak-hours.test.ts — 24 pass"
}

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

Labels

bot:triaged Classified by the community triage bot pr:needs-work Right idea, not mergeable as written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add FriendliAI as a model provider

3 participants