Skip to content

[pull] main from danny-avila:main#117

Merged
pull[bot] merged 2 commits into
innFactory:mainfrom
danny-avila:main
Jun 19, 2026
Merged

[pull] main from danny-avila:main#117
pull[bot] merged 2 commits into
innFactory:mainfrom
danny-avila:main

Conversation

@pull

@pull pull Bot commented Jun 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…#253)

* fix(bedrock): gate only the tool cache point to Claude models

Amazon Nova rejects a `cachePoint` under `toolConfig.tools` —
`Malformed input request: #/toolConfig/tools/0: extraneous key [cachePoint]
is not permitted` — yet LibreChat auto-defaults Nova to `promptCache: true`,
so the SDK injected the unsupported tool checkpoint and Nova 400'd.

Live probe against us.amazon.nova-lite-v1:0 (Converse):
- tool cachePoint    -> 400 ValidationException
- message cachePoint -> 200, cacheWriteInputTokens=240
- system cachePoint  -> 200, cacheWriteInputTokens=241

So only the *tool* checkpoint is Claude-only; Nova caches system/messages
fine. Add `supportsBedrockToolCache(model)` and gate ONLY the tool cache
point on it, leaving message/system caching enabled for Nova:
- bedrock/index.ts invocationParams — skip the toolConfig cache point on
  non-Claude models, using a model id captured at construction (survives the
  application-inference-profile ARN swap during generation)
- Graph.ts — skip Bedrock tool marking on non-Claude models; message/system
  tail cache stays gated on promptCache alone
- AgentContext.ts summarization path stays gated on promptCache alone

This is a capability gate (the key is rejected outright), distinct from the
1h/5m TTL value which Bedrock downgrades gracefully.

Fixes danny-avila/LibreChat#13838

* fix(bedrock): treat the default Claude model as tool-cache-capable (Codex review)

When `model` is omitted, LangChain initializes the model to a default Claude
model, but the tool-cache gates saw '' / undefined and wrongly skipped caching
for that valid Claude path.

- index.ts: capture `fields?.model ?? this.model` (super() sets this.model to
  the default Claude model) instead of `?? ''`
- Graph.ts: treat an omitted clientOptions.model as the default Claude model
  (only an explicit non-Claude model skips tool marking)
- test: omitted model + promptCache + tools still gets the tool cache point
@pull pull Bot locked and limited conversation to collaborators Jun 19, 2026
@pull pull Bot added the ⤵️ pull label Jun 19, 2026
@pull pull Bot merged commit 076e203 into innFactory:main Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant