Skip to content

feat(ai-import): persist learned temperature-support across restarts - #5

Open
silasg wants to merge 1 commit into
claude/issue-1151-fix-proposal-4a0dkffrom
claude/issue-1151-persist-temperature-cache
Open

feat(ai-import): persist learned temperature-support across restarts#5
silasg wants to merge 1 commit into
claude/issue-1151-fix-proposal-4a0dkffrom
claude/issue-1151-persist-temperature-cache

Conversation

@silasg

@silasg silasg commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Builds on #4 (the best-effort temperature fallback). That cache is currently session-lifetime; this PR persists it so a model learned to reject temperature once is never probed again — even after an app restart.

Stacked on #4 — base branch is claude/issue-1151-fix-proposal-4a0dkf. Review/merge #4 first; the diff here is only the persistence layer.

Changes

  • hydrateTemperatureSupportCache / snapshotTemperatureSupportCache on the communication service.
  • New ai_temperature_unsupported_models: string[] setting (interface, defaults, migration guard).
  • The cloud extraction service seeds the cache from settings before a request and persists any newly-learned rejection afterwards — in a finally, so the knowledge is saved even when the request itself ultimately fails.

Testing

Added specs for hydrate (skips temperature up front for a persisted model) and snapshot (exposes a freshly-learned key), plus extraction-service specs asserting a new rejection is written to settings and that nothing is re-saved when nothing new is learned.

Same environment caveat as #4: the pure communication-service seam is verified via an esbuild bundle of the real module; the Angular-layer wiring is covered by specs but the full Karma run is blocked locally by the xlsx egress policy. Please confirm via pnpm test in CI.

🤖 Generated with Claude Code


Generated by Claude Code

Builds on the best-effort temperature fallback: the set of provider+model
keys that reject an explicit temperature is now seeded from and saved back
to settings, so a model learned once is never probed again — even after an
app restart.

- add `hydrateTemperatureSupportCache` / `snapshotTemperatureSupportCache`
- store the keys in a new `ai_temperature_unsupported_models` setting
- the cloud extraction service hydrates before a request and persists any
  newly-learned rejection afterwards (even when the request itself failed)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKKv2cbKhcgE2cTbkhvzjd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants