Compress oversized browser history in model-sized stages so switching to a smaller model can recover. Bound the recent-history fallback when summarization fails without deleting persisted messages.
Avoid matching OpenAI-compatible model IDs across providers. Use an 8K fallback so automatic compression runs before unknown providers reject long conversations.