Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

498 B
Raw Blame
import  { type AiFullModelCard } from 'model-bank';

/**
 * Get the max outputs for a specific model from the provider's model list
 * @param modelId The ID of the model
 * @param models The provider's model list to search in
 * @returns The max output value or undefined
 */
export const getModelMaxOutputs = (
  modelId: string,
  models: AiFullModelCard[],
): number | undefined => {
  const model = models.find((model) => model.id === modelId);
  return model ? model.maxOutput : undefined;
};