mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Merge 1e5bf7bc3f into 05d8f11085
This commit is contained in:
commit
d4fb053eff
1 changed files with 2 additions and 7 deletions
|
|
@ -1287,13 +1287,8 @@ def get_model_context_length(
|
|||
if local_ctx and local_ctx > 0:
|
||||
save_context_length(model, base_url, local_ctx)
|
||||
return local_ctx
|
||||
logger.info(
|
||||
"Could not detect context length for model %r at %s — "
|
||||
"defaulting to %s tokens (probe-down). Set model.context_length "
|
||||
"in config.yaml to override.",
|
||||
model, base_url, f"{DEFAULT_FALLBACK_CONTEXT:,}",
|
||||
)
|
||||
return DEFAULT_FALLBACK_CONTEXT
|
||||
# Don't early-return the fallback here — continue to steps 4-8
|
||||
# so hardcoded defaults and models.dev can still match.
|
||||
|
||||
# 4. Anthropic /v1/models API (only for regular API keys, not OAuth)
|
||||
if provider == "anthropic" or (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue