feat(ai-import): persist learned temperature-support across restarts - #5
Open
silasg wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
temperatureonce is never probed again — even after an app restart.Changes
hydrateTemperatureSupportCache/snapshotTemperatureSupportCacheon the communication service.ai_temperature_unsupported_models: string[]setting (interface, defaults, migration guard).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.
🤖 Generated with Claude Code
Generated by Claude Code