provider: add FriendliAI inference provider - #1756
Open
Lee-Si-Yoon wants to merge 2 commits into
Open
Conversation
Author
|
Friendly reminder: after merge, could the maintainers add FriendliAI to the providers listing at portkey.ai/models/providers and create the model/docs pages (portkey.ai/models/friendli, portkey.ai/docs/integrations/llms/friendli)? Happy to provide any information needed. |
Lee-Si-Yoon
force-pushed
the
provider/friendli
branch
from
July 30, 2026 13:17
abbe910 to
7342def
Compare
Adds FriendliAI as an OpenAI-compatible inference provider. - Base URL: https://api.friendli.ai/serverless/v1 - Supports chat completions with streaming - Maps Friendli's reasoning_content to content_blocks (thinking type), following the same pattern as OpenRouter - Adds Friendli-specific params: chat_template_kwargs, parse_reasoning, include_reasoning for controllable reasoning models (e.g. GLM-5.2) - Optional X-Friendli-Team header via providerOptions.friendliTeam - Registered in globals, providers index, test variables, and README table
Updates default model and test variables to use GLM-5.2, which supports controllable reasoning via enable_thinking.
Lee-Si-Yoon
force-pushed
the
provider/friendli
branch
from
July 30, 2026 13:23
7342def to
eb878ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Description:
/v1/chat/completionsto Friendli's serverless API athttps://api.friendli.ai/serverless/v1.parse_reasoningis on, Friendli splits reasoning intochoices[].message.reasoning_content. This change maps that field tocontent_blockswith typethinking, matching how OpenRouter handles it.chat_template_kwargs(forenable_thinkingon controllable reasoning models like GLM-5.2),parse_reasoning, andinclude_reasoning.X-Friendli-Teamheader viaproviderOptions.friendliTeam.globals.ts,providers/index.ts, test variables, and the README providers table.A docs page on
portkey.ai/docs/integrations/llmswould be the next step — happy to help with that if the maintainers want it in this PR or a follow-up.Tests Run/Test cases added:
npm run buildpassesprettier --checkon all modified fileseslinton all new and modified filesFRIENDLI_API_KEYenv var)Type of Change: