textmachine/backend/configs/models.yaml

89 lines
4.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Модели и цены TextMachine (Р4/Р5: состав и цены — ТОЛЬКО здесь, с датой
# проверки; код не знает ни одной цены).
#
# Источники проверки 2026-07-04 (воркфлоу-фактчек, официальные страницы):
# DeepSeek https://api-docs.deepseek.com/quick_start/pricing
# Anthropic https://platform.claude.com/docs/en/about-claude/pricing
# Z.AI/GLM https://docs.z.ai/guides/overview/pricing
# Kimi https://platform.kimi.ai/docs/pricing/chat-k26
# xAI https://docs.x.ai/docs/models (Grok 4.1 Fast retired 15.05.2026!)
# Gemini https://ai.google.dev/gemini-api/docs/pricing
prices_checked: "2026-07-04"
# Fallback-якорь цены: неизвестная модель (например, фактическая модель после
# фейловера, которой нет в таблице) книжится по этой цене, никогда по $0.
default_model: deepseek-v4-flash
providers:
deepseek:
kind: openai
base_url: https://api.deepseek.com/v1
api_key_env: DEEPSEEK_API_KEY
reasoning: subset # thinking внутри completion_tokens
timeouts: { attempt_s: 240, max_attempts: 3, backoff_cap_s: 60 }
zai: # GLM, международный контур (docs.z.ai)
kind: openai
base_url: https://api.z.ai/api/paas/v4
api_key_env: ZAI_API_KEY
reasoning: subset
timeouts: { attempt_s: 240, max_attempts: 3, backoff_cap_s: 60 }
kimi: # домен сменился: platform.moonshot.ai → 301 → platform.kimi.ai
kind: openai
base_url: https://api.kimi.ai/v1
api_key_env: KIMI_API_KEY
reasoning: subset
timeouts: { attempt_s: 240, max_attempts: 3, backoff_cap_s: 60 }
anthropic:
kind: anthropic
api_key_env: ANTHROPIC_API_KEY
cache_ttl: 5m # per-stage override — Фаза 1 (context.cache_ttl в конфиге ядра)
timeouts: { attempt_s: 240, max_attempts: 3, backoff_cap_s: 60 }
local: # ollama/llama-server на стенде (боевой env — memory textmachine-local-stand)
kind: local
base_url: http://127.0.0.1:11434/v1
model: huihui_ai/qwen3-abliterated:8b
max_tokens: 8192 # у ollama лимит покрывает thinking+ответ вместе
timeouts: { attempt_s: 600, max_attempts: 2, backoff_cap_s: 10 } # полигон: чанки 63278 с
models:
deepseek-v4-flash:
provider: deepseek
price: { input_per_m: 0.14, cached_per_m: 0.0028, cache_write_per_m: 0, output_per_m: 0.28 }
note: >-
Черновик (Р4). Автокэш по префиксу, отдельной цены записи нет.
deepseek-chat/reasoner отключаются 24.07.2026 — сюда не возвращаться.
glm-5:
provider: zai
price: { input_per_m: 1.0, cached_per_m: 0.2, cache_write_per_m: 0, output_per_m: 3.2 }
extra_body: { thinking: { type: disabled } } # эмпирика полигона: thinking GLM — таймауты ×3
note: Редактор ru-стиля (Р4). Флагманы линейки уже GLM-5.1/5.2 ($1.4/$4.4) — пересмотреть к Фазе 2.
kimi-k2.6:
provider: kimi
price: { input_per_m: 0.95, cached_per_m: 0.16, cache_write_per_m: 0, output_per_m: 4.0 }
note: Альтернативный редактор (Р4).
claude-sonnet-5:
provider: anthropic
price: { input_per_m: 2.0, cached_per_m: 0.20, cache_write_per_m: 2.50, output_per_m: 10.0 }
min_cache_prefix_tokens: 1024
note: >-
Промо $2/$10 до 31.08.2026 включительно; с 01.09.2026 — $3/$15 (кэш
write 5m $3.75, hit $0.30) — ОБНОВИТЬ. cache_write_per_m здесь — 5m TTL.
Только SFW-книги и контур прямых ключей (Р5, интерим-правило 18+).
claude-opus-4-8:
provider: anthropic
price: { input_per_m: 5.0, cached_per_m: 0.50, cache_write_per_m: 6.25, output_per_m: 25.0 }
min_cache_prefix_tokens: 1024
note: Судья/эскалация — только адресно, канал A (Р4). cache_write — 5m TTL.
local-qwen3-8b:
provider: local
price: { input_per_m: 0, cached_per_m: 0, cache_write_per_m: 0, output_per_m: 0 }
note: Скрининг/экстракция (Р4 — «спецслужба, не переводчик»). $0 допустим только для local-провайдера.