Skip to content

feat: add Friendli provider reasoning support - #3476

Open
Lee-Si-Yoon wants to merge 3 commits into
charmbracelet:mainfrom
Lee-Si-Yoon:feat/friendli-provider
Open

feat: add Friendli provider reasoning support#3476
Lee-Si-Yoon wants to merge 3 commits into
charmbracelet:mainfrom
Lee-Si-Yoon:feat/friendli-provider

Conversation

@Lee-Si-Yoon

Copy link
Copy Markdown

What

Adds Friendli-specific reasoning handling to the openai-compat provider switch in coordinator.go, and adds FRIENDLI_API_KEY to the environment variables table in the README.

Friendli is being added to Catwalk in charmbracelet/catwalk#486. This PR handles the Crush-side coordinator support.

Why the separate case

Friendli's reasoning API works differently from the other openai-compat providers. Instead of reasoning_effort or thinking.type, it uses:

  • chat_template_kwargs.enable_thinking to toggle reasoning on controllable models
  • parse_reasoning to split reasoning into a separate reasoning_content field
  • include_reasoning to include reasoning content in the response

Without this case, reasoning content would stay inline in the content field, making it harder for Crush to distinguish between thinking and answer text.

Note

The provider ID is referenced as a string literal ("friendli") rather than catwalk.InferenceProviderFriendli because the Catwalk version in go.mod predates that constant. Once Catwalk is bumped, this can be switched to the typed constant.

@charmcli

charmcli commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Comment thread README.md
@Lee-Si-Yoon

Copy link
Copy Markdown
Author

I have read the Contributor License Agreement (CLA) and hereby sign the CLA.

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