Add limited Freebuff DeepSeek access#657
Merged
Merged
Conversation
…ted-deepseek # Conflicts: # cli/src/components/waiting-room-screen.tsx # web/src/app/api/v1/chat/completions/_post.ts
…ted-deepseek # Conflicts: # packages/internal/src/db/migrations/meta/0051_snapshot.json # packages/internal/src/db/migrations/meta/_journal.json # web/src/app/api/v1/chat/completions/_post.ts # web/src/server/free-mode-country.ts
|
thanks @jahooma for this |
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
Adds a limited Freebuff access tier for users outside the approved-country path, including VPN/unknown-location classifications. Limited users are routed to DeepSeek V4 Flash, see only that model in the selector, and are capped at five one-hour limited sessions per Pacific day.
What changed
fullorlimitedaccess instead of hard-blocking unsupported locations.accessTierthrough session responses.access_tieronfree_sessionandfree_session_admitwith a generated migration.origin/mainand preserve its premium reset countdown and analytics/logging updates.Validation
bun test common/src/__tests__/freebuff-models.test.ts web/src/server/free-session/__tests__/public-api.test.ts web/src/app/api/v1/freebuff/session/__tests__/session.test.ts web/src/app/api/v1/chat/completions/__tests__/completions.test.ts cli/src/utils/__tests__/freebuff-premium-reset.test.ts common/src/util/__tests__/analytics-sampling.test.tsbun run --cwd common typecheckbun run --cwd cli typecheckbun run --cwd web typecheckbun run --cwd packages/internal typecheckgit diff --checkNote: the chat completions test path still prints the existing Postgres reconnect
TimeoutNegativeWarning, but the tests pass.