Skip to content
Source
Sign inSign up
TanStack/ai

gpt 5 chat model names are incorrect #173

Closedflybayer(GitHub profile, opens in a new tab) opened this issue 1 comment

TanStack AI version

v0.2.0

Framework/Library version

hono 1.19.6

Describe the bug and the steps to reproduce it

Try

  const adapter = openaiText("gpt-5.2-chat", {
    apiKey: process.env.OPENAI_API_KEY,
  })

but it fails saying the model is not available.

>>> chatStream: Fatal error during response creation <<<
>>> Error message: 400 The requested model 'gpt-5.2-chat' does not exist.
>>> Error stack: Error: 400 The requested model 'gpt-5.2-chat' does not exist.
    at APIError.generate (/Users/b/c/flightcontrol2/node_modules/.pnpm/openai@6.15.0_ws@8.17.1_zod@4.2.1/node_modules/openai/src/core/error.ts:72:14)
    at OpenAI.makeStatusError (/Users/b/c/flightcontrol2/node_modules/.pnpm/openai@6.15.0_ws@8.17.1_zod@4.2.1/node_modules/openai/src/client.ts:478:28)
    at OpenAI.makeRequest (/Users/b/c/flightcontrol2/node_modules/.pnpm/openai@6.15.0_ws@8.17.1_zod@4.2.1/node_modules/openai/src/client.ts:728:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async OpenAITextAdapter.chatStream (/Users/b/c/flightcontrol2/node_modules/.pnpm/@tanstack+ai-openai@0.2.0_@tanstack+ai@0.2.0_ws@8.17.1_zod@4.2.1/node_modules/@tanstack/ai-openai/src/adapters/text.ts:109:24)

Change to this and it works

  const adapter = openaiText("gpt-5.2-chat-latest" as "gpt-5.2-chat", {
    apiKey: process.env.OPENAI_API_KEY,
  })

.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  1. 📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Related PRs

    TanStack/ai#166 - add gpt 5.2 models to model meta [merged]

    👤 Suggested Assignees


  2. 🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  • AlemTuzlak closed this

  • Sign in to join this conversation.