Three changes, in order of impact:
- Retrieve, don't paste. Chunk the docs, embed them once (pgvector in Supabase works fine), and per question send only the top 5-8 relevant chunks. That's ~3k tokens instead of 30k.
- Prompt caching for the parts that don't change (system prompt, fixed instructions). Both Anthropic and OpenAI discount cached input tokens heavily. With Anthropic you mark the stable prefix with
cache_control; it pays off when the same prefix is reused within the cache lifetime. - Trim history. Keep the last ~6 turns plus a short running summary, not the whole thread.
Model routing on top: a small model to classify "simple FAQ vs needs reasoning", big model only for the latter.
After 1-3, I'd expect well under $0.05 per conversation.