Skip to content

Feature/mapbox migration - #69

Merged
LourenzBani merged 4 commits into
developfrom
feature/mapbox-migration
Jul 9, 2026
Merged

Feature/mapbox migration#69
LourenzBani merged 4 commits into
developfrom
feature/mapbox-migration

Conversation

@LourenzBani

Copy link
Copy Markdown

Current working setup with Mapbox implementation.
No road avoidance functionality yet.

Copilot AI review requested due to automatic review settings July 9, 2026 08:21
@LourenzBani
LourenzBani merged commit 7f0cfbd into develop Jul 9, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the Mapbox migration work by refining backend intent/prompt scaffolding and improving robustness of the LLM + routing pipeline.

Changes:

  • Updated intent-classification prompt templates to use valid JSON examples.
  • Adjusted /heyroute/ handling for empty transcripts and improved error-return consistency in route generation.
  • Added vLLM model auto-detection for the self-hosted Qwen-compatible endpoint.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
backend/prompts.py Updates intent prompt JSON templates used for GPT-based intent classification.
backend/model.py Tweaks /heyroute/ control-flow and routing error returns in the core backend service.
backend/llm_gpt.py Adds model auto-detection logic when using the default Qwen model name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/prompts.py
Comment on lines 152 to +156
Exactly ONE value must be true.

{
"preference_remembering": true/false,
"no_preference_remembering": true/false
"preference_remembering": false,
"no_preference_remembering": false
Comment thread backend/prompts.py
Comment on lines 171 to +175
Exactly ONE value must be true.

{
"request_alternates": true/false,
"select_route": true/false,
"cancellation": true/false,
"start_new_trip": true/false
"request_alternates": false,
"select_route": false,
Comment thread backend/model.py
Comment on lines +215 to +216
# Instead of crashing, just return a polite request to speak again
return {"heyroute": "I didn't catch that. Could you say it again?", "history": state.conversation_history, "turn_number": current_turn, "intents": {}}
Comment thread backend/llm_gpt.py
Comment on lines +28 to +29
models_url = QWEN_API_URL.replace("/chat/completions", "/models")
response = await client.get(models_url, timeout=5.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants