Skip to content

feat: add bf16.ai provider - #790

Open
FiendSaws wants to merge 1 commit into
charmbracelet:mainfrom
FiendSaws:feat/bf16-provider
Open

FiendSaws wants to merge 1 commit into
charmbracelet:mainfrom
FiendSaws:feat/bf16-provider

Conversation

@FiendSaws

Copy link
Copy Markdown

Adds bf16.ai as an OpenAI-compatible inference provider (bf16) along with a cmd/bf16 generator wired into Taskfile.yaml and .github/workflows/sync.yml.

Details

  • Provider ID / Auth: bf16 ($BF16_API_KEY)
  • API Endpoint: https://api.bf16.ai/v1 (type: "completions")
  • Default Models:
    • Large: zai-org/glm-5.3-uncensored (1M context, 131,072 max output, reasoning + tools)
    • Small: deepseek/deepseek-v4.1-flash-uncensored (1M context, 130,000 max output, vision + reasoning + tools)
  • Catalog & Pricing: Fetched live from the public unauthenticated GET https://api.bf16.ai/v1/models endpoint (USD per 1M tokens including cache_hit, context windows up to 1,048,576, toggleable reasoning with low/medium/high/max effort levels, and vision support where advertised).
  • Auto-sync: cmd/bf16/main.go requires no API key or repository secret and skips smart-router aliases (bf16/auto*), keeping concrete tool-capable models synced automatically.

Verification

Ran the full local verification suite on Linux arm64 (go@1.26.11, gofumpt@0.10.0, golangci-lint@2.13.1):

  • go run ./cmd/bf16/main.go

  • task format (gofumpt -w . + go run ./cmd/format)

  • task lint (golangci-lint run ./... — 0 issues)

  • task test (go test ./... — all packages pass)

  • I have read CONTRIBUTING.md.

  • [-] I have created a discussion that was approved by a maintainer (for new features). This adds a provider config and its sync generator only.

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