feat: Simplify tiered pricing to show user's plan tier price#606
Draft
jirispilka wants to merge 1 commit intomasterfrom
Draft
feat: Simplify tiered pricing to show user's plan tier price#606jirispilka wants to merge 1 commit intomasterfrom
jirispilka wants to merge 1 commit intomasterfrom
Conversation
Instead of outputting verbose pricing breakdowns for all tiers (BRONZE, SILVER, GOLD, PLATINUM, DIAMOND), resolve to a single price based on the user's actual plan tier. Adds a short hint like "(your BRONZE plan price)" in text output and a `resolvedForTier` field in structured output. Changes: - Add getUserPlanTierCached() in userid_cache.ts (separate cache) - Add tier resolution helpers in pricing_info.ts - Thread userTier through actor_card.ts and actor_details.ts format functions - Update all 5 tool handlers to fetch and pass user tier - Remove tieredPricing arrays from structured output schemas - Add unit tests for pricing tier resolution https://claude.ai/code/session_01RNnzsiNrtM3qJX9i1Kqfqy
7df89d6 to
fa6dc88
Compare
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
Closes #578
Closes #547
(your BRONZE plan price)or(base price; see Actor pricing page for all tiers)when tier is unknownresolvedForTierfield in structured output replacing the removedtieredPricingarraysChanges
userid_cache.ts: AddgetUserPlanTierCached()with separate TTL cachepricing_info.ts: AddresolveTieredUnitPrice(),resolveEventPrice(),tierNote()helpers; updatepricingInfoToStringandpricingInfoToStructuredto acceptuserTierparamactor_card.ts: ThreaduserTierthrough 4 format functionsactor_details.ts: ThreaduserTierthroughfetchActorDetailsandprocessActorDetailsForResponsestructured_output_schemas.ts: RemovetieredPricingarrays, addresolvedForTiergetUserPlanTierCachedand pass it throughTest plan
npm run type-checkpassesnpm run lintpassesnpm run test:unitpasses (410 tests, 17 new pricing tests)https://claude.ai/code/session_01RNnzsiNrtM3qJX9i1Kqfqy