claude-code-best/src/utils/model
Askhz 0aa86c9f84 feat(costrict): use cheapest model by creditConsumption for haiku-tier auxiliary tasks
All auxiliary requests (session memory, extract memories, side queries,
forked agents) now resolve to the model with the lowest creditConsumption
from the /v1/models list when using the CoStrict provider, instead of
falling back to the main conversation model.

- Add getCheapestCoStrictModel() to select cheapest model from cached list
- Resolve haiku-family models to cheapest model in resolveCoStrictModel
- Change getSmallFastModel() for CoStrict to return haiku alias
- Fix sideQuery() to respect opts.model with known-model validation
- Override mainLoopModel in SessionMemory and extractMemories forked agents
- Use getSmallFastModel() for findRelevantMemories under CoStrict

Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-19 19:13:49 +08:00
..
__tests__ style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
agent.ts Merge remote-tracking branch 'origin' into fix/sdd-design-invalid-tool-params 2026-05-12 21:31:12 +08:00
aliases.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
antModels.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
bedrock.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
chatgptModels.ts fix: 修复CI格式检查失败 2026-05-09 16:21:07 +08:00
check1mAccess.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
configs.ts fix: 修复 sideQuery/模型选择在 CoStrict 和 OpenAI provider 下的问题 2026-04-29 18:02:53 +08:00
contextWindowUpgradeCheck.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
deprecation.ts fix(types): clean type fixes across 92 files 2026-04-09 23:45:56 +08:00
model.ts feat(costrict): use cheapest model by creditConsumption for haiku-tier auxiliary tasks 2026-05-19 19:13:49 +08:00
modelAllowlist.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
modelCapabilities.ts feat: 添加 model/provider 层改进 2026-04-22 22:38:10 +08:00
modelOptions.ts chore: 合并社区 upstream/main 代码至 v2.4.2 2026-05-12 11:55:04 +08:00
modelStrings.ts claude-code with OpenAI mode fix 2026-04-04 01:21:00 +08:00
modelSupportOverrides.ts feat: 添加 model/provider 层改进 2026-04-22 22:38:10 +08:00
providers.ts chore: 合并社区 upstream/main 代码至 v2.4.2 2026-05-12 11:55:04 +08:00
validateModel.ts style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00