feat: migrate to Routes API and add rich place attributes#62
Merged
Conversation
Routes API Migration: - Add RoutesService.ts as dedicated Routes API REST client - Migrate directions/distance-matrix/planRoute from legacy SDK to Routes API - planRoute now uses native waypoint optimization (up to 25 stops) - Update searchAlongRoute polyline extraction for Routes API format - Remove legacy directions/distance-matrix code from toolclass.ts Place Attributes Expansion: - Add 31 new fields to placeFieldMask (parking, dining, atmosphere, accessibility, AI summaries) - Zero additional API cost — already paying Enterprise+Atmosphere SKU via reviews - Place details now return: primary_type, types, editorial_summary, parking, accessibility, dining_options (dine_in/delivery/takeout/reservable), serves (vegetarian/beer/wine/cocktails), atmosphere (good_for_groups/children/outdoor_seating/allows_dogs/live_music), payment_options, review_summary, generative_summary, and review language codes - Search results now include primary_type and price_level - comparePlaces now includes parking, serves, atmosphere, dining_options Docs: - Add docs/research-ai-place-selection.md (AI place selection feasibility study) - Add docs/backlog-and-strategy.md (consolidated from 4 retired planning docs) - Update tools-api.md with new response fields documentation - Update architecture.md and google-maps-api-guide.md for Routes API Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RoutesService.ts).planRoutenow uses native waypoint optimization (up to 25 stops) instead of manual nearest-neighbor.placeFieldMask— parking, dining options, atmosphere, accessibility, AI summaries. Zero additional API cost (already paying Enterprise+Atmosphere SKU viareviews).Changed Files
src/services/RoutesService.tssrc/services/NewPlacesService.tssrc/services/PlacesSearcher.tssrc/services/toolclass.tssrc/tools/maps/planRoute.tsskills/google-maps/references/tools-api.mddocs/research-ai-place-selection.mddocs/backlog-and-strategy.mdNew Place Details Fields
maps_place_detailsnow returns (when available):primary_type/types— precise place categorizationparking— free lot, street, valet, garageserves— vegetarian, beer, wine, cocktails, breakfast/lunch/dinneratmosphere— good for groups/children, outdoor seating, allows dogs, live musicdining_options— dine in, delivery, takeout, reservableaccessibility— wheelchair accessible parking/entrance/restroom/seatingeditorial_summary/review_summary/generative_summary— AI summariesreviews[].language— review language codeSearch results (
maps_search_nearby,maps_search_places) now includeprimary_typeandprice_level.Test plan
npm run build— passesnpm test— 159 passed, 0 failedmaps_place_detailsreturns new fields for a real placemaps_search_nearbyreturnsprimary_typein results🤖 Generated with Claude Code