Conversation
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.
{
"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- AddsfriendlitoALLOWED_MODEL_PREFIXESso the new IDs passisExplicitlyDefinedModel()and agent-template validation.\n- Introduces afriendliModelsmap with two serverless models (GLM-5.2,MiniMax-M2.5) and spreads it into the canonicalmodelsobject.\n- Addsfriendli.aitoproviderDomainsand afriendli/prefix check ingetLogoForModelso 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 privateweb/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>+ optionalX-Friendli-Team|\n| Metadata |GET .../serverless/v1/models|\n| Reasoning | booleanparse_reasoning/include_reasoning,chat_template_kwargs.enable_thinking; response fieldreasoning_content(notthinkingblock) |\n| Incompatibility |response_format+toolstogether 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"}