Add Omi Uber call chat tool app#7437
Conversation
Greptile SummaryThis PR adds
Confidence Score: 3/5Safe to merge after fixing the unguarded ValueError in the geolocation path — current code returns 500 on malformed lat/lng from the Omi device payload. The core URL-building logic in uber_links.py is solid and well-tested, but main.py calls build_location before the try/except ValueError block, so any non-numeric value arriving in the geolocation dict propagates as an unhandled exception yielding a 500 response. plugins/uber_call/main.py — the error handling around build_location calls needs attention before this goes to production. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant O as Omi Platform
participant A as uber_call FastAPI
participant UL as uber_links.py
participant UB as Uber App
U->>O: Call Uber to SFO Airport
O->>A: GET /.well-known/omi-tools.json
A-->>O: call_uber tool manifest
O->>A: POST /api/call_uber
A->>UL: build_location pickup
A->>UL: build_location dropoff
A->>UL: build_uber_deep_links
UL-->>A: UberDeepLinks web_link app_link
A-->>O: result web_link app_link
O-->>U: Uber is ready. Open link to confirm
U->>UB: Opens deep link confirms ride
Reviews (1): Last reviewed commit: "Add Omi Uber call chat tool app" | Re-trigger Greptile |
| pickup = build_location( | ||
| latitude=pickup_latitude, | ||
| longitude=pickup_longitude, | ||
| formatted_address=pickup_address, | ||
| nickname=( | ||
| "Current location" | ||
| if pickup_address or (pickup_latitude is not None and pickup_longitude is not None) | ||
| else None | ||
| ), | ||
| ) | ||
| dropoff = build_location( | ||
| latitude=payload.dropoff_latitude, | ||
| longitude=payload.dropoff_longitude, | ||
| formatted_address=payload.dropoff_address or payload.destination, | ||
| nickname=payload.destination or payload.dropoff_address, | ||
| ) |
There was a problem hiding this comment.
Unhandled
ValueError from malformed geolocation data causes 500
build_location is called before the try/except ValueError block that guards build_uber_deep_links. If _geo_value extracts a non-numeric string for latitude or longitude (e.g., the Omi device sends "latitude": "unknown" in the geolocation dict), _normalize_float will call float("unknown") and raise a ValueError that is never caught, resulting in an unhandled 500 instead of a clean 400. Move both build_location calls inside the try/except, or add a separate try/except around them.
| "parameters": { | ||
| "properties": { |
There was a problem hiding this comment.
The
parameters object in the manifest is missing "type": "object", which is required by the JSON Schema specification. Some Omi tool parsers and validators that strictly check the schema structure may reject or mishandle the manifest.
| "parameters": { | |
| "properties": { | |
| "parameters": { | |
| "type": "object", | |
| "properties": { |
| fastapi>=0.111.0 | ||
| uvicorn[standard]>=0.30.0 |
There was a problem hiding this comment.
httpx is not listed as a dependency but is required by fastapi.testclient.TestClient (used in the PR's own validation script). Without it, from fastapi.testclient import TestClient will raise an ImportError in any environment that installs only what is in requirements.txt.
| fastapi>=0.111.0 | |
| uvicorn[standard]>=0.30.0 | |
| fastapi>=0.111.0 | |
| httpx>=0.27.0 | |
| uvicorn[standard]>=0.30.0 |
kodjima33
left a comment
There was a problem hiding this comment.
thanks for the Uber call chat tool app
|
Hi @kodjima33 — thanks for the approval, glad the Uber call app is useful! 🙏 Quick status so it's easy to action:
I know #2316 got parked during the old-issue cleanup. Since the app is now built, reviewed, and approved, would you be open to merging it and reactivating the $1K bounty on #2316? Happy to rebase or make any final tweaks you'd like first. Either way, thanks for the review — the app works against Uber's official deep-link flow, so the user always confirms pickup/destination/price/payment inside Uber. |
Summary
plugins/uber_call, a FastAPI Omi Chat Tools app for issue send uber app #2316./.well-known/omi-tools.jsonwith acall_ubertool and/api/call_uberendpoint./claim #2316
Demo
Short demo video: https://sravan27.github.io/money-27-proof/proof/omi_uber_call_demo.mp4
Example output from the endpoint smoke test:
Review Follow-Up
Greptile's review on the first commit called out three items. Commit
847e2c1addresses them:ValueErrorguard, so malformed lat/lng returns HTTP 400 instead of a 500;httpx>=0.27.0toplugins/uber_call/requirements.txtforfastapi.testclient.TestClient;"type": "object"to the Omi tool manifest parameter schema;plugins/uber_call/test_main.pyendpoint tests for manifest shape, successful request, and malformed geolocation handling.Validation
Focused local result with FastAPI dependencies:
No Uber API keys, OAuth tokens, payment credentials, secrets, hidden context, or private runtime data are included.