-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker build #3157
base: main
Are you sure you want to change the base?
Worker build #3157
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added support for X.ai (formerly Twitter) provider across multiple files, integrating cost tracking and API handling capabilities.
- Added X.ai provider configuration in
/bifrost/packages/cost/providers/mappings.ts
with regex pattern^https:\/\/api\.x\.ai/
and associated costs - Added four new X.ai models (grok-beta, grok-vision-beta, grok-2-1212, grok-2-vision-1212) with pricing in cost calculations
- Updated database queries in
/worker/src/lib/RequestWrapper.ts
to use booleanfalse
instead of string"false"
forsoft_delete
field - Extended API specification in swagger.json and routes.ts to include X provider in ProviderName enum
8 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -52,6 +53,8 @@ const firecrawl = /^https:\/\/api\.firecrawl\.dev/; | |||
const awsBedrock = /^https:\/\/bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com\/.*/; | |||
// https://api.deepseek.com | |||
const deepseek = /^https:\/\/api\.deepseek\.com/; | |||
// https://api.x.ai | |||
const x = /^https:\/\/api\.x\.ai/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: regex pattern for x.ai should include optional 'api.' subdomain for consistency with other patterns like openRouter
@@ -52,6 +53,8 @@ const firecrawl = /^https:\/\/api\.firecrawl\.dev/; | |||
const awsBedrock = /^https:\/\/bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com\/.*/; | |||
// https://api.deepseek.com | |||
const deepseek = /^https:\/\/api\.deepseek\.com/; | |||
// https://api.x.ai | |||
const x = /^https:\/\/api\.x\.ai/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: regex pattern for x.ai should include optional 'api.' prefix for consistency with openRouter pattern
{ | ||
pattern: x, | ||
provider: "X", | ||
costs: xCosts, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: X provider configuration should be placed after AWS and before DEEPSEEK to maintain alphabetical ordering with other providers
{ | ||
pattern: x, | ||
provider: "X", | ||
costs: xCosts, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: X provider entry should be placed at the end of the providers array to maintain alphabetical ordering with other providers
@@ -52,6 +53,8 @@ const firecrawl = /^https:\/\/api\.firecrawl\.dev/; | |||
const awsBedrock = /^https:\/\/bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com\/.*/; | |||
// https://api.deepseek.com | |||
const deepseek = /^https:\/\/api\.deepseek\.com/; | |||
// https://api.x.ai | |||
const x = /^https:\/\/api\.x\.ai/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: regex pattern should include optional 'api.' prefix for consistency with other patterns like openRouter
{ | ||
pattern: x, | ||
provider: "X", | ||
costs: xCosts, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: X provider entry should be placed at the end of the providers array for consistency with providersNames order
@@ -52,6 +53,8 @@ const firecrawl = /^https:\/\/api\.firecrawl\.dev/; | |||
const awsBedrock = /^https:\/\/bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com\/.*/; | |||
// https://api.deepseek.com | |||
const deepseek = /^https:\/\/api\.deepseek\.com/; | |||
// https://api.x.ai | |||
const x = /^https:\/\/api\.x\.ai/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: URL pattern regex should include end-of-string anchor ($) to prevent partial matches
{ | ||
pattern: x, | ||
provider: "X", | ||
costs: xCosts, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: X provider configuration should include modelDetails property for consistency with other major providers like OpenAI and Anthropic
No description provided.