feat: migrate conversations list to v3 API (DEVP-664) - #306
Open
andymohajeri wants to merge 1 commit into
Open
Conversation
The v1 conversations API sunsets end of August 2026. Moves `poly conversations list` to the v3 endpoint in regions where it's live (us-1/uk-1/euw-1); dev/staging/studio keep the v1 endpoint until v3 rolls out there. `get`/`get-audio` are unaffected - they hit a different, unversioned endpoint that already returns this shape. - platform_api.py: new platform_region_to_base_url map + use_platform_api flag, region-aware list_conversations (v3 URL/params vs v1 fallback) - cli_commands/conversations.py: --cursor/--channel/--in-progress flags, threads account_id through - console.py: print_conversations reads both v3 (snake_case) and v1 fallback (camelCase) field names, drops the Summary column (no v3 equivalent - still available via `poly conversations get`) - docs + tests updated accordingly
Contributor
Coverage Report
Changed file coverage
|
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
Migrates
poly conversations listoff the deprecated v1 conversations API to v3 in the regions where v3 is live, updating CLI wiring, response handling, and output accordingly.Motivation
The v1 conversations API is deprecated and sunsets end of August 2026. ADK's conversations integration still targeted the old endpoint surface for
listand needed to move before v1 is switched off.Closes DEVP-664
Changes
handlers/platform_api.py: newplatform_region_to_base_urlmap +use_platform_apiflag onget_base_url/make_request;list_conversationsis now region-aware — calls the v3 URL/params inus-1/uk-1/euw-1(the only regions with a live v3 host today), falls back to the existing v1 call indev/staging/studiountil v3 rolls out there.handlers/interface.py:AgentStudioInterface.list_conversationssignature updated to match (account_id,cursor,channel,in_progress).cli_commands/conversations.py: added--cursor,--channel(repeatable),--in-progress/--no-in-progresstopoly conversations list; threadsproject.account_idthrough.output/console.py:print_conversationsnow reads both the v3 (snake_case) and v1-fallback (camelCase) field shapes via a small_field()helper, and drops the Summary column — the v3 list response has no summary/tags/PolyScore/note/deployment ID/direction/language field, unlike v1. Those remain available per-conversation viapoly conversations get, which is unaffected by this change (different, unversioned endpoint).docs/docs/reference/cli/conversations.md: documents the new flags, the regional split, and both possible--jsonshapes.cli_test.pyandplatform_api_test.pyfor the region branching, new params, and updated response shape.get/get-audioare intentionally untouched — confirmed at the code level (not just docs) that they're served by a different, unversioned endpoint with no v2/v3 variant to move to.Test strategy
poly <command>)Full local E2E pass against a real
dev-region project:list,list --json,listwith the new flags,get,get --json, andget-audio(verified the downloaded file is a real WAV). v3 branch itself (us-1/uk-1/euw-1) is covered by mocked unit tests plus a dry-run confirming the exact URL/params each region resolves to; not yet run against a live v3 project.Checklist
ruff check .andruff format --check .passpytestpasses (1552 passed)polyCLI interface (or migration path documented) —list --jsonoutput shape changes forus-1/uk-1/euw-1(documented in the CLI reference);get/get-audiounchangedScreenshots / Logs
Local E2E output (against a real
devproject) confirmslist/get/get-audioall work end to end, including the table dropping the Summary column whilegetretains it. Happy to paste specifics if useful.