OpenAI today, Anthropic tomorrow, local Ollama next year. FlowSquad's provider pattern means a single config change swaps your LLM โ no code changes required.
LLM vendor lock-in occurs when your application's AI capabilities are so tightly coupled to a single provider's API โ model names, prompt formats, token limits, rate-limit handling โ that migrating to a competitor requires a significant rewrite. For enterprise software teams, this is not a theoretical risk. OpenAI's GPT-4 Turbo has seen 3 major pricing changes in 18 months. Anthropic's Claude models regularly surpass GPT-4 on coding benchmarks. A new open-weight model can emerge and obsolete cloud pricing overnight.
The real cost of lock-in is not just the migration effort โ it is the strategic paralysis. When switching providers costs weeks of engineering time, teams delay decisions that could dramatically reduce costs or improve output quality. For a team spending $3,000/month on GPT-4 calls that Ollama Mistral could handle at infrastructure cost alone, lock-in is a recurring monthly tax.
FlowSquad's Multi-LLM Architecture was designed from day one to make the LLM a swappable configuration value, not an architectural dependency. Every feature โ Epic decomposition, story generation, code analysis, HLD/LLD design, test case generation, AskProduct Q&A โ routes through a provider abstraction layer that normalizes requests and responses regardless of the underlying model.
At the core of FlowSquad's LLM infrastructure is a provider registry โ a dictionary of named adapters, each implementing a common interface with three methods: complete(prompt), stream(prompt), and embed(text). When a feature like Story Generation issues an LLM call, it calls the registry with the configured provider name. The registry resolves the adapter, injects model parameters, handles retries, and returns a normalized response object.
This means zero application code changes when switching providers. The 12 LLM-powered features in FlowSquad all consume the same interface. Provider-specific quirks โ Anthropic's max_tokens_to_sample vs OpenAI's max_tokens, Claude's system prompt format vs GPT-4's message role format โ are encapsulated entirely within each adapter class.
FlowSquad ships with 5 production-ready LLM provider adapters covering the most widely used commercial and open-weight models available in 2025โ2026. Each adapter is tested against FlowSquad's full feature suite, including structured JSON output requirements (for Epic/Story/Task decomposition), long-context requirements (for full-codebase analysis), and streaming requirements (for real-time UI feedback).
| Provider | Model | Context Window | Cost / 1k Input Tokens | On-Premise? |
|---|---|---|---|---|
| OpenAI | GPT-4 Turbo | 128,000 tokens | $0.01 | Cloud only |
| Anthropic | Claude 3.5 Sonnet | 200,000 tokens | $0.003 | Cloud only |
| Azure OpenAI | GPT-4o / GPT-4 Turbo | 128,000 tokens | $0.01 (enterprise) | Azure VNet |
| Ollama | Llama2 (7B / 13B / 70B) | 4,096 tokens | $0.00 | Full air-gap |
| Ollama | Mistral 7B Instruct | 8,192 tokens | $0.00 | Full air-gap |
Azure OpenAI is particularly valuable for enterprises already contracted with Microsoft โ the model is identical to OpenAI's offering but routes through your own Azure subscription, qualifying for existing enterprise agreements and data residency commitments. All API keys are stored as Fernet-encrypted (AES-128) fields in the database, never as plain text.
Switching LLM providers in FlowSquad requires exactly 4 actions: navigate to Admin โ LLM Configuration, select a new provider from the dropdown, enter the new API key (or leave blank for Ollama), click Save. The change takes effect on the next request โ there is no service restart, no migration script, no downtime window. The previous provider's API key is retained in encrypted storage so you can roll back instantly.
For teams operating in CI/CD pipelines or infrastructure-as-code environments, the FlowSquad Setup Wizard also exposes LLM configuration via environment variables. Setting FLOWSQUAD_LLM_PROVIDER=anthropic and ANTHROPIC_API_KEY=sk-ant-... in your deployment manifest is sufficient to boot FlowSquad with Claude as the default model โ no UI interaction required.
A/B testing between providers is supported via FlowSquad's product-level LLM override: your production product can use GPT-4 while a staging product uses Mistral, all within the same FlowSquad instance. This allows side-by-side quality comparison on real workloads before committing to a provider switch.
Based on internal benchmarking across 500 Epic decomposition requests using the same 10 test prompts across providers, the following latency and quality characteristics were observed. Note that Ollama performance is highly hardware-dependent โ a 4ร A100 GPU server will outperform a CPU-only host by over 10ร.
GPT-4 Turbo produces the highest structural consistency for Epic/Story/Task JSON output (98.2% valid JSON on first attempt) and handles ambiguous product requirements most gracefully. Average latency for a full 10-story Epic decomposition: 4.2 seconds.
Claude 3.5 Sonnet excels on long-context analysis tasks. For HLD/LLD generation from large codebases (50k+ tokens), Claude outperforms GPT-4 Turbo on coherence metrics by ~12% based on reviewer ratings, while costing 70% less per token. Average latency: 5.8 seconds.
Ollama Mistral 7B on mid-tier GPU hardware (RTX 3090) achieves ~18 tokens/second throughput. For teams with on-premise GPU resources, this effectively eliminates per-request AI costs while keeping all data within the enterprise perimeter โ critical for air-gapped environments and organizations subject to data sovereignty regulations.
Yes. If your fine-tuned model is served via an OpenAI-compatible API (as most Ollama models and many fine-tuning platforms are), you can point FlowSquad's Ollama adapter at it by setting the base_url and model fields. Full custom adapter support for arbitrary APIs is on the roadmap for Q2 2026.
No. FlowSquad stores all generated content (Epics, Stories, HLD/LLD, test cases) as structured data in the application database, independent of which LLM produced them. Switching providers only affects future generation requests โ historical content is never modified.
Ollama runs as a local HTTP server on your infrastructure. FlowSquad's Ollama adapter sends requests to http://your-ollama-host:11434 โ entirely within your network. No outbound internet connection is required. Model weights are downloaded once to your Ollama server; FlowSquad itself never contacts external model registries.
Both. A global default LLM provider is set in Admin โ LLM Configuration. Individual products can override this default with a product-level provider selection, allowing different products to use different models simultaneously within the same FlowSquad instance.
All LLM API keys are encrypted using Fernet (AES-128) symmetric encryption before being written to the database. The encryption key is stored as an environment variable on the host, never in the database itself. This means a database breach exposes only ciphertext โ the keys remain protected as long as the environment variable is not compromised.