Commit Graph
7 Commits
Author SHA1 Message Date
Evan 6785807633 feat(providers): add reasoning_echo_policy field for OpenAI-compat reasoning_content handling (#90)
Refs librefang/librefang#4842 — long-term replacement for the substring
match that the OpenAI driver currently uses to decide how to handle
`reasoning_content` on historical assistant turns.

Three provider-specific behaviours that the driver must distinguish at
wire time, now expressed as catalog metadata:

* `strip`  — DeepSeek R1 / deepseek-reasoner. The API rejects requests
  that carry reasoning_content on previous assistant messages.
* `echo`   — DeepSeek V4 Flash. Thinking mode is on by default and the
  API rejects multi-turn requests when assistant turns containing
  tool_calls don't echo back the original reasoning text. This is the
  bug surfaced in librefang/librefang#4842.
* `empty_string` — Moonshot / Kimi K2 family. The field must be present
  (empty string) on tool_calls turns, with thinking disabled wire-side
  for multi-turn compatibility.
* `none` (default) — most providers; field is omitted entirely.

V4 Pro is intentionally NOT marked `echo` — librefang#4842 reports it
working out-of-the-box; flip when there's an empirical reproducer.

Marks affected models:

  providers/deepseek.toml
    deepseek-v4-flash → echo
    deepseek-reasoner → strip
  providers/moonshot.toml
    kimi-k2.6, kimi-k2.5, kimi-k2 → empty_string
  providers/kimi-coding.toml
    kimi-for-coding → empty_string
  providers/byteplus-coding.toml
    kimi-k2.5 → empty_string
  providers/novita.toml
    moonshotai/kimi-k2-thinking → empty_string

Tooling:

* schema.toml registers the field with the four enum options and a
  `none` default so existing TOML files keep parsing unchanged.
* scripts/validate.py rejects unknown enum values; verified with a
  hand-crafted negative case (`reasoning_echo_policy = "bogus"` →
  validation fails with the expected message).
* `python3 scripts/validate.py` passes (267 models).

The librefang side that consumes this field will land in a follow-up
PR — until then, registry consumers ignore the field via
`#[serde(default)]` and the existing substring fallback continues to
work, so this commit is safe to ship independently.
2026-05-11 00:41:24 +09:00
Evan d3b9814fb1 feat: add 2026 Q2 flagship models (#76)
Add latest flagships released in April 2026 that registry missed:
- deepseek: V4-Pro, V4-Flash (2026-04-24, 1M context)
- qwen: qwen3.6-max-preview (2026-04-20, 256K context)
- moonshot: kimi-k2.6 (2026-04-20, 256K context)
- zhipu: glm-5.1 (2026-04-08), glm-4.7-flash (free tier)

Update default aliases: deepseek -> v4-pro, kimi -> k2.6, glm -> 5.1.
2026-04-27 09:43:52 +09:00
Evan 4f8dd2404d feat(providers): expand ollama catalog with thinking-capable models (#58)
* feat(providers): expand ollama model catalog with thinking-capable models

Add commonly used local models with accurate capability flags:
- gemma4, gemma3: supports_thinking, supports_vision
- deepseek-r1: supports_thinking (fix missing flag)
- deepseek-v3: supports_tools
- qwen3, qwq: supports_thinking
- llama4: supports_vision
- llama3.3: supports_tools
- phi4: supports_tools

Previously only 6 models were listed and none had supports_thinking
(except deepseek-r1), causing the dashboard to hide thinking toggles
for models that actually support it.

* chore(providers): major cleanup — remove defunct providers and old models

Delete 21 defunct/obscure providers:
aion-labs, arcee-ai, deepcogito, eleutherai, essentialai, ibm-granite,
inception, inflection, kwaipilot, lemonade, liquid, morph, nex-agi,
nousresearch, prime-intellect, reka, relace, switchpoint, tngtech,
upstage, writer

Clean up 10 major providers — keep only latest generation models:
- anthropic: remove claude-3.5-sonnet (superseded by 4.x)
- openai: remove gpt-4o/4-turbo/3.5/o1/o3-mini (superseded by gpt-5/4.1/o3/o4-mini)
- gemini: remove 1.5-*/2.0-flash (superseded by 2.5/3.x)
- deepseek: remove coder/chat-v3-0324 (superseded by r1/v3)
- qwen: remove turbo/2.5-coder (superseded by qwen3)
- groq: remove old llama/mixtral/gemma (keep latest only)
- mistral: remove medium/nemo/pixtral-large (keep large/small/codestral)
- xai: remove grok-2 (superseded by grok-3/4)
- meta-llama: remove 3.x/guard (keep llama-4 + 3.3)
- ollama: rewrite with current models (gemma4, qwen3, qwq, llama4, etc)

Total: 90 → 48 models across major providers. All thinking-capable
models now have supports_thinking = true.

* chore: add pre-commit hook for automatic TOML formatting

- .githooks/pre-commit: runs taplo fmt on staged .toml files
- Makefile: add setup target + auto-configure hooks on first make
- .gitignore: add .make-setup-done and .sync_marker
2026-04-15 22:18:01 +09:00
Evan 85db9c8d78 feat(providers): add supports_thinking to thinking-capable models (#53)
* feat(providers): add supports_thinking field to thinking-capable models

Mark models that support extended thinking / reasoning with
supports_thinking = true so the dashboard can conditionally show
thinking toggles.

Providers updated: anthropic (8), codex-cli (7), gemini (6),
openai (3), qwen (2), deepseek (1). Schema updated accordingly.

* feat(providers): add supports_thinking to remaining thinking-capable models

Cover 19 additional providers: alibaba-coding-plan, allenai, arcee-ai,
fireworks, gemini-cli, groq, liquid, nvidia-nim, ollama, openai (codex),
openrouter, perplexity, qwen-code, replicate, sambanova, tngtech,
venice, vertex-ai, xai.

Total: 62 models across 24 providers now have supports_thinking = true.

* feat(providers): add supports_thinking to chutes, huggingface, together

Missed in prior commits: DeepSeek-R1 on chutes/huggingface/together,
Qwen3-235B on chutes. Total now 66 models across 27 providers.

* feat(providers): add supports_thinking to bedrock, claude-code, aider, moonshot, stepfun

- bedrock: all 5 Claude models
- claude-code: all 3 models (opus/sonnet/haiku wrappers)
- aider: aider/sonnet (Claude-backed)
- moonshot: kimi-k2.5 (reasoning mode)
- stepfun: step-1o-turbo-vision (reasoning model)

Total: 77 models across 32 providers.

* feat(providers): add supports_thinking to alibaba kimi-k2.5, openrouter claude-sonnet-4
2026-04-15 00:46:51 +09:00
github-actions[bot] 310c03b1e6 chore: sync model pricing from OpenRouter API 2026-03-25 14:50:12 +00:00
Evan 553ecc6947 feat: add pricing sync script and update model prices from OpenRouter (#27)
* fix: pin npm package versions in MCP integration templates

Prevent supply chain attacks by pinning exact versions instead of
using unpinned `npx -y @package` which pulls latest on every run.

23 of 25 integrations pinned. sqlite-mcp and aws skipped (packages
not found on npm registry).

* fix: use stable azure/mcp version instead of beta

* feat: add pricing sync script and update model prices from OpenRouter API

- scripts/sync-pricing.py fetches real-time pricing from OpenRouter
- Updated 64 price fields across 13 provider files
- Run periodically or in CI to keep prices current
2026-03-25 23:43:13 +09:00
Evan 21c82e335c feat: initial model catalog with 196 models across 39 providers
Community-maintained TOML catalog for LibreFang. New models can be added
via PR without requiring a LibreFang binary release.

Includes validation script, bilingual docs, and GitHub templates.
2026-03-14 11:52:10 +09:00