Python CLI that routes a raw user message to the right structured Gemini pipeline.
The program first asks Gemini to classify the input into one of several modes, validates the routing decision with Pydantic, then calls the matching structured output pipeline.
raw text
→ Gemini router
→ RouteDecision validation
→ pipeline registry lookup
→ model + prompt selection
→ Gemini structured output
→ Pydantic validation
→ display result
task_extraction
job_offer_analysis
recipe_generation
unknown
If the router returns unknown, low confidence, or requires clarification, the program stops before calling the business pipeline.
multi-mode-router-cli/
main.py
config.py
models.py
llm_client.py
prompts.py
router.py
pipeline.py
registry.py
display.py
samples/
python main.py samples/task_message.txt
python main.py samples/job_offer.txt
python main.py samples/recipe_request.txt
python main.py samples/ambiguous.txtThe project uses Pydantic models as contracts:
RouteDecision
TaskExtraction
JobOfferAnalysis
Recipe
Each Gemini response is validated before being used by the program.