Skip to content

Conversation

@minpeter
Copy link
Contributor

Summary

Enhance FriendliAI provider with reasoning toggle variants and filter out models without tool_call support.

Changes

Schema (packages/core/src/schema.ts)

  • Add variants field to model schema for reasoning toggle support:
    variants: z.record(z.object({
      chat_template_kwargs: z.record(z.union([z.boolean(), z.string(), z.number()])).optional(),
    })).optional()

Generator (packages/core/script/generate-friendli.ts)

  • Filter out models where functionality.tool_call === false
  • These models cannot be used effectively in OpenCode

Model Files

Added variants to 5 models (reasoning toggle via enable_thinking):

  • Qwen/Qwen3-32B
  • Qwen/Qwen3-30B-A3B
  • LGAI-EXAONE/EXAONE-4.0.1-32B
  • LGAI-EXAONE/K-EXAONE-236B-A23B
  • zai-org/GLM-4.6

Removed 2 models (tool_call=false):

  • meta-llama/Llama-4-Scout-17B-16E-Instruct
  • meta-llama/Llama-4-Maverick-17B-128E-Instruct

Provider

  • Renamed from "Friendli" to "FriendliAI"

Variants Format

[variants.off]
chat_template_kwargs = { enable_thinking = false }

[variants.on]
chat_template_kwargs = { enable_thinking = true }

Related

Notes

  • Models without variants (Qwen3-235B Instruct/Thinking, Llama 3.x) are intentionally left without variants as they have fixed reasoning modes

- Add variants field to model schema for reasoning toggle support
- Add variants (enable_thinking on/off) to 5 models:
  Qwen3-32B, Qwen3-30B-A3B, EXAONE-4.0.1-32B, K-EXAONE-236B-A23B, GLM-4.6
- Filter out models without tool_call support in generator
- Remove Llama-4-Scout and Llama-4-Maverick (tool_call=false)
- Rename provider to FriendliAI
@minpeter
Copy link
Contributor Author

Related PR: anomalyco/opencode#7987 (OpenCode - adds FriendliAI provider support in transform.ts)

@opencode-agent
Copy link
Contributor

User minpeter does not have write permissions

github run

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.

1 participant