Configuring AI
Abstractions uses a language model for two things: indexing your repository (extracting meaning from commits and PRs) and generating newsletter drafts. You bring your own API key — Abstractions doesn't proxy a shared model.
Supported providers
- Anthropic — Claude models (Sonnet, Haiku, Opus)
- OpenAI — GPT-4o, GPT-4 Turbo, and other chat models
Adding a provider
- Go to AI in the sidebar
- Click Add provider
- Select Anthropic or OpenAI
- Paste in your API key
- Choose the model for indexing and the model for generation
- Save
You can configure both providers and mix models — for example, use a faster model for indexing and a more capable one for generation.
Choosing models
Indexing model — runs over your commit and PR history to extract context. A mid-tier model (Claude Haiku, GPT-4o Mini) is usually fast and cheap enough here.
Generation model — writes your newsletter drafts. A more capable model (Claude Sonnet, GPT-4o) produces noticeably better output.
Start with Claude Haiku for indexing and Claude Sonnet for generation. This keeps costs low while producing high-quality newsletters.
How Abstractions uses your models
You pick two models per provider: one for indexing, one for generation. They do different things and have different cost profiles.
The indexing model
During indexing, Abstractions calls your indexing model twice per file chunk:
- Summarization — the model reads the chunk and produces a plain-language summary of what it does. These summaries are stored and later used as context for generation.
- Embedding — the model converts each chunk summary into a vector embedding. The embeddings are stored and queried via cosine similarity at generation time.
Because the indexing model runs against every chunk in every file — potentially thousands of calls for a large repo — this is where most of your token spend comes from. A smaller, faster model (Claude Haiku, GPT-4o Mini) handles this well and keeps costs predictable.
The generation model
When you generate a newsletter, Abstractions:
- Embeds the topic title using the generation model
- Runs a vector similarity search against your stored chunk embeddings, retrieving the 12 most relevant chunks
- Passes those chunks and their summaries to the generation model, which writes the newsletter section
The generation model only runs once per newsletter (not per file), so it sees a much lower call volume. This is where quality matters most — use a more capable model here.
If you're managing costs, the highest-leverage change is using a smaller model for indexing. Generation is cheap by comparison because it's a single call per newsletter.
Removing a provider
To remove a configured provider, open the AI settings page, find the provider row, and click Remove.
Any repositories using that provider's models will stop generating newsletters until you configure a replacement provider.
Troubleshooting
"AI not configured" warning in the dashboard — you haven't added a provider yet, or the saved API key is invalid. Re-enter the key and save.
Generation fails silently — check that your API key has sufficient quota. Abstractions surfaces the raw error from the provider when generation fails.
Next steps
- Getting Started — full setup walkthrough
- Integrations — connect GitHub after configuring AI