Repository navigation
Conversation
…ookup_key aliases When the LLM passes an aliased lookup_key (e.g. explorer_annual instead of aao_membership_explorer_50), create_payment_link/send_invoice/confirm_send_invoice now include did_you_mean: canonicalKey in the JSON response so the model learns the canonical key for subsequent calls in the same conversation. Also tightens the three tool descriptions to explicitly forbid constructing the key from tier name and billing interval. Bumps CODE_VERSION to 2026.04.6. Closes #2550 https://claude.ai/code/cse_01HULrqPhn8kLM76nSmcpj4d
bokelley
force-pushed
the
claude/issue-2550-billing-did-you-mean
branch
from
April 27, 2026 11:36
aad8856 to
22cf57b
Compare
bokelley
added a commit
that referenced
this pull request
Apr 30, 2026
The lifecycle-flow doc PR accidentally absorbed the did_you_mean billing changes that are the subject of #3353. Reverting billing-tools.ts and stripe-client.ts to origin/main and removing the duplicate changeset so this PR is docs-only as intended. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bokelley
added a commit
that referenced
this pull request
Apr 30, 2026
…l variation (#3354) * fix(addie): surface did_you_mean in billing tools for non-canonical lookup_key aliases When the LLM passes an aliased lookup_key (e.g. explorer_annual instead of aao_membership_explorer_50), create_payment_link/send_invoice/confirm_send_invoice now include did_you_mean: canonicalKey in the JSON response so the model learns the canonical key for subsequent calls in the same conversation. Also tightens the three tool descriptions to explicitly forbid constructing the key from tier name and billing interval. Bumps CODE_VERSION to 2026.04.6. Closes #2550 https://claude.ai/code/cse_01HULrqPhn8kLM76nSmcpj4d * docs: add Media Buy Lifecycle Flow page with state diagram and PG deal variation Closes #2570. https://claude.ai/code/session_01HULrqPhn8kLM76nSmcpj4d * chore: remove billing changes that belong on #3353 The lifecycle-flow doc PR accidentally absorbed the did_you_mean billing changes that are the subject of #3353. Reverting billing-tools.ts and stripe-client.ts to origin/main and removing the duplicate changeset so this PR is docs-only as intended. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude <[email protected]>
Contributor
Author
|
Closing — main is already at the right shape per the Current state in
The tool already accepts aliases and resolves silently. The PR's additions (return-shape change, — Triage 2026-05-13 |
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.
Closes #2550
Summary
getPriceByLookupKeynow returns{ priceId, canonicalKey }instead ofstring | null, so alias resolution is a single call and callers learn the canonical key automaticallycreate_payment_link,send_invoice, andconfirm_send_invoiceincludedid_you_mean: canonicalKeyin their response when the LLM passed a non-canonical alias (e.g.explorer_annual→aao_membership_explorer_50), so the model corrects itself on subsequent callslookup_keyfrom tier name + billing interval;lookup_keyfield description simplified to "do not construct or guess this value"getPriceByLookupKeymoved inside try/catch with early-return on null — previously a Stripe network error would propagate as an unhandled rejection instead of a{ success: false }responsegetBillingProductsandresolveLookupKeyAliasimports from billing-tools.ts (alias resolution is handled insidegetPriceByLookupKey)CODE_VERSIONbumped to2026.04.6Non-breaking: adds an optional
did_you_meanfield to existing success-response JSON; no fields renamed or removed; existing callers unaffected.Test plan
create_payment_linkwith alias key (e.g.explorer_annual) → response includesdid_you_mean: "aao_membership_explorer_50"create_payment_linkwith canonical key → nodid_you_meanfield in responsecreate_payment_linkwith unknown key →{ success: false, error: "No product matches..." }send_invoiceandconfirm_send_invoicegetPriceByLookupKey→{ success: false }(not unhandled rejection)https://claude.ai/code/session_01HULrqPhn8kLM76nSmcpj4d