🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix(model-bank): add maxOutput to official gpt-4o, gpt-4-turbo and grok 4.x cards (#23120)
YuTengjingd4ebb3357c47
diff --git a/packages/model-bank/src/aiModels/openai/index.test.ts b/packages/model-bank/src/aiModels/openai/index.test.tsindex 3d56c11bb3e..3c34fc6f18c 100644--- a/packages/model-bank/src/aiModels/openai/index.test.ts+++ b/packages/model-bank/src/aiModels/openai/index.test.ts@@ -28,4 +28,16 @@ describe('openai chat model cards', () => {},]);});++ /**+ * Consumers size per-request output budgets from `maxOutput`, so every+ * official card must declare it.+ */+ it('declares maxOutput on every official chat card', () => {+ const missing = openaiChatModels+ .filter((model) => model.isOfficial && model.maxOutput == null)+ .map((model) => model.id);++ expect(missing).toEqual([]);+ });});diff --git a/packages/model-bank/src/aiModels/openai/legacyChat.ts b/packages/model-bank/src/aiModels/openai/legacyChat.tsindex e898d4569a9..3a7a0d3b143 100644--- a/packages/model-bank/src/aiModels/openai/legacyChat.ts+++ b/packages/model-bank/src/aiModels/openai/legacyChat.ts@@ -301,6 +301,8 @@ export const openaiLegacyChatModels: AIChatModelCard[] = [id: 'gpt-4o',isOfficial: true,knowledgeCutoff: '2023-10',+ /** @see https://developers.openai.com/api/docs/models/gpt-4o */+ maxOutput: 16_384,pricing: {units: [{ name: 'textInput_cacheRead', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },@@ -407,6 +409,8 @@ export const openaiLegacyChatModels: AIChatModelCard[] = [id: 'gpt-4-turbo',isOfficial: true,knowledgeCutoff: '2023-12',+ /** @see https://developers.openai.com/api/docs/models/gpt-4-turbo */+ maxOutput: 4096,pricing: {units: [{ name: 'textInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },diff --git a/packages/model-bank/src/aiModels/xai.test.ts b/packages/model-bank/src/aiModels/xai.test.tsindex 5f3a795f543..b882365a9ed 100644--- a/packages/model-bank/src/aiModels/xai.test.ts+++ b/packages/model-bank/src/aiModels/xai.test.ts@@ -37,4 +37,16 @@ describe('xai model cards', () => {},]);});++ /**+ * Consumers size per-request output budgets from `maxOutput`, so every+ * official chat card must declare it.+ */+ it('declares maxOutput on every official chat card', () => {+ const missing = allModels+ .filter((model) => model.type === 'chat' && model.isOfficial && model.maxOutput == null)+ .map((model) => model.id);++ expect(missing).toEqual([]);+ });});diff --git a/packages/model-bank/src/aiModels/xai.ts b/packages/model-bank/src/aiModels/xai.tsindex a716eefc698..2d1135305ea 100644--- a/packages/model-bank/src/aiModels/xai.ts+++ b/packages/model-bank/src/aiModels/xai.ts@@ -17,6 +17,13 @@ const xaiChatModels: AIChatModelCard[] = [enabled: true,id: 'grok-4.7',isOfficial: true,+ /**+ * xAI publishes no output cap for this model (its release notes state no text output limit).+ * Value matches public platform data (models.dev, AIHubMix, Vercel AI Gateway, Cloudflare).+ * @see https://docs.x.ai/developers/models/grok-4.7+ * @see https://models.dev+ */+ maxOutput: 500_000,/** @see https://docs.x.ai/developers/models/grok-4.7 */pricing: {units: [@@ -74,6 +81,13 @@ const xaiChatModels: AIChatModelCard[] = [enabled: true,id: 'grok-4.6',isOfficial: true,+ /**+ * xAI publishes no output cap for this model (its release notes state no text output limit).+ * Value matches public platform data (models.dev, AIHubMix, Vercel AI Gateway, Cloudflare).+ * @see https://docs.x.ai/developers/models/grok-4.6+ * @see https://models.dev+ */+ maxOutput: 500_000,/** @see https://docs.x.ai/developers/models/grok-4.6 */pricing: {units: [@@ -133,6 +147,13 @@ const xaiChatModels: AIChatModelCard[] = [generation: 'grok-4.5',id: 'grok-4.5',isOfficial: true,+ /**+ * xAI publishes no output cap for this model.+ * Value matches public platform data (models.dev, AIHubMix, Vercel AI Gateway, Cloudflare).+ * @see https://docs.x.ai/developers/models/grok-4.5+ * @see https://models.dev+ */+ maxOutput: 500_000,pricing: {units: [{@@ -187,6 +208,13 @@ const xaiChatModels: AIChatModelCard[] = [id: 'grok-4.3',isOfficial: true,knowledgeCutoff: '2025-12',+ /**+ * xAI publishes no output cap for this model.+ * Value matches public platform data (models.dev, AIHubMix, Vercel AI Gateway, Cloudflare).+ * @see https://docs.x.ai/developers/models/grok-4.3+ * @see https://models.dev+ */+ maxOutput: 30_000,pricing: {units: [{