Problem
A portfolio backend with AI functionality should remain available even when a provider hits quota limits or is temporarily unavailable.
Solution
FastAPI with LangChain multi-fallback: Google Gemini, OpenAI, and Groq are used depending on feature and availability. The goal is reliable downstream processing of LLM results via validated, typed data structures (Pydantic structured output) for the demo endpoints.
Result
CV assistant, vision analysis, sentiment analysis, and agent chat live at sinanucar.com — with resilient operation even during provider outages.
Technical details and decisions
Technical Architecture
Astro frontend with FastAPI backend, four demo endpoints, separate fallback chains for text and vision, and Pydantic models for structured responses.
Engineering Decisions
- Model text and vision fallbacks separately
- Use Pydantic structured output instead of manual JSON parsing
- Portfolio demo with constrained inputs and no permanent chat history storage
Demonstrates
Controlled assistant interaction, structured text classification, multimodal analysis, and resilient provider fallback.
Status
Live proof of controlled AI integration on sinanucar.com.