Skip to content

Commit 8b18558

Browse files
committed
feat: Enable groq support for PTB
this commit enables support for standard model usage in groq (ie, chat completions, and models with industry standard token usage pricing rates). future work will be undertaken to add PTB support for the following model types on groq: - STT - tool use (GPT-OSS and groq compound models only)
1 parent 80ebad6 commit 8b18558

File tree

33 files changed

+1670
-51
lines changed

33 files changed

+1670
-51
lines changed

bifrost/lib/clients/jawnTypes/public.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ export interface paths {
414414
post: operations["GetCostsOverTime"];
415415
};
416416
"/v1/public/model-registry/models": {
417+
/**
418+
* Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities
419+
* @description Get all available models from the registry
420+
*/
417421
get: operations["GetModelRegistry"];
418422
};
419423
"/v1/public/compare/models": {
@@ -2756,7 +2760,7 @@ Json: JsonObject;
27562760
/** @enum {string} */
27572761
ModelProviderName: "anthropic" | "openai" | "bedrock" | "vertex" | "azure" | "perplexity" | "groq" | "deepseek" | "cohere" | "xai" | "google-ai-studio";
27582762
/** @enum {string} */
2759-
AuthorName: "anthropic" | "openai" | "perplexity" | "deepseek" | "cohere" | "xai" | "google" | "meta-llama" | "mistralai" | "amazon" | "microsoft" | "nvidia" | "qwen" | "moonshotai" | "passthrough";
2763+
AuthorName: "anthropic" | "openai" | "perplexity" | "deepseek" | "cohere" | "xai" | "google" | "meta-llama" | "mistralai" | "amazon" | "microsoft" | "nvidia" | "qwen" | "moonshotai" | "alibaba" | "passthrough";
27602764
/** @enum {string} */
27612765
StandardParameter: "max_tokens" | "temperature" | "top_p" | "top_k" | "stop" | "stream" | "frequency_penalty" | "presence_penalty" | "repetition_penalty" | "seed" | "tools" | "tool_choice" | "functions" | "function_call" | "reasoning" | "include_reasoning" | "thinking" | "response_format" | "json_mode" | "truncate" | "min_p" | "logit_bias" | "logprobs" | "top_logprobs" | "structured_outputs" | "verbosity";
27622766
ModelPricing: {
@@ -2782,8 +2786,14 @@ Json: JsonObject;
27822786
thinking?: number;
27832787
/** Format: double */
27842788
request?: number;
2785-
/** Format: double */
2786-
audio?: number;
2789+
audio?: number | {
2790+
/** @enum {string} */
2791+
unit: "seconds";
2792+
/** Format: double */
2793+
pricePerUnit: number;
2794+
/** Format: double */
2795+
minimumIncrement: number;
2796+
};
27872797
/** Format: double */
27882798
video?: number;
27892799
/** Format: double */
@@ -6348,9 +6358,13 @@ export interface operations {
63486358
};
63496359
};
63506360
};
6361+
/**
6362+
* Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities
6363+
* @description Get all available models from the registry
6364+
*/
63516365
GetModelRegistry: {
63526366
responses: {
6353-
/** @description Ok */
6367+
/** @description Complete model registry with models and filter options */
63546368
200: {
63556369
content: {
63566370
"application/json": components["schemas"]["Result_ModelRegistryResponse.string_"];

docs/swagger.json

Lines changed: 110 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7578,6 +7578,7 @@
75787578
"nvidia",
75797579
"qwen",
75807580
"moonshotai",
7581+
"alibaba",
75817582
"passthrough"
75827583
]
75837584
},
@@ -7663,8 +7664,37 @@
76637664
"format": "double"
76647665
},
76657666
"audio": {
7666-
"type": "number",
7667-
"format": "double"
7667+
"anyOf": [
7668+
{
7669+
"type": "number",
7670+
"format": "double"
7671+
},
7672+
{
7673+
"properties": {
7674+
"unit": {
7675+
"type": "string",
7676+
"enum": [
7677+
"seconds"
7678+
],
7679+
"nullable": false
7680+
},
7681+
"pricePerUnit": {
7682+
"type": "number",
7683+
"format": "double"
7684+
},
7685+
"minimumIncrement": {
7686+
"type": "number",
7687+
"format": "double"
7688+
}
7689+
},
7690+
"required": [
7691+
"unit",
7692+
"pricePerUnit",
7693+
"minimumIncrement"
7694+
],
7695+
"type": "object"
7696+
}
7697+
]
76687698
},
76697699
"video": {
76707700
"type": "number",
@@ -18221,16 +18251,93 @@
1822118251
"operationId": "GetModelRegistry",
1822218252
"responses": {
1822318253
"200": {
18224-
"description": "Ok",
18254+
"description": "Complete model registry with models and filter options",
1822518255
"content": {
1822618256
"application/json": {
1822718257
"schema": {
1822818258
"$ref": "#/components/schemas/Result_ModelRegistryResponse.string_"
18259+
},
18260+
"examples": {
18261+
"Example 1": {
18262+
"value": {
18263+
"models": [
18264+
{
18265+
"id": "claude-opus-4-1",
18266+
"name": "Anthropic: Claude Opus 4.1",
18267+
"author": "anthropic",
18268+
"contextLength": 200000,
18269+
"endpoints": [
18270+
{
18271+
"provider": "anthropic",
18272+
"providerSlug": "anthropic",
18273+
"supportsPtb": true,
18274+
"pricing": {
18275+
"prompt": 15,
18276+
"completion": 75,
18277+
"cacheRead": 1.5,
18278+
"cacheWrite": 18.75
18279+
}
18280+
}
18281+
],
18282+
"maxOutput": 32000,
18283+
"trainingDate": "2025-08-05",
18284+
"description": "Most capable Claude model with extended context",
18285+
"inputModalities": [
18286+
null
18287+
],
18288+
"outputModalities": [
18289+
null
18290+
],
18291+
"supportedParameters": [
18292+
null,
18293+
null,
18294+
null,
18295+
null,
18296+
null,
18297+
null,
18298+
null
18299+
]
18300+
}
18301+
],
18302+
"total": 150,
18303+
"filters": {
18304+
"providers": [
18305+
{
18306+
"name": "anthropic",
18307+
"displayName": "Anthropic"
18308+
},
18309+
{
18310+
"name": "openai",
18311+
"displayName": "OpenAI"
18312+
},
18313+
{
18314+
"name": "google",
18315+
"displayName": "Google"
18316+
}
18317+
],
18318+
"authors": [
18319+
"anthropic",
18320+
"openai",
18321+
"google",
18322+
"meta"
18323+
],
18324+
"capabilities": [
18325+
"audio",
18326+
"image",
18327+
"thinking",
18328+
"caching",
18329+
"reasoning"
18330+
]
18331+
}
18332+
}
18333+
}
1822918334
}
1823018335
}
1823118336
}
1823218337
}
1823318338
},
18339+
"description": "Get all available models from the registry",
18340+
"summary": "Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities",
1823418341
"tags": [
1823518342
"Model Registry"
1823618343
],

0 commit comments

Comments
 (0)