Skip to content

Replace retired openai.beta.assistants / openai.beta.threads calls with the Responses API - #524

Open
vngiabao wants to merge 1 commit into
reactiflux:mainfrom
vngiabao:fix/resume-review-responses-api
Open

vngiabao wants to merge 1 commit into
reactiflux:mainfrom
vngiabao:fix/resume-review-responses-api

Conversation

@vngiabao

Copy link
Copy Markdown

The openai.beta.assistants and openai.beta.threads calls in src/features/resume.ts have failed since 2026-08-26, when OpenAI shut down the Assistants API (deprecation notice: https://developers.openai.com/api/docs/deprecations). This PR moves the resume review to the Responses API, following OpenAI's migration guide: https://developers.openai.com/api/docs/assistants/migration

What changed

src/features/resume.ts

  • The assistant's instructions were already in this file, and configure() pushed them to OpenAI at startup. They are now a constant sent with each request, and the startup assistants.update call is gone.
  • The review is one openai.responses.create(...) call. The resume PDF goes in as an input_file, so the model reads the whole document instead of searching it.
  • The PDF is uploaded with purpose user_data, the purpose OpenAI's file-input guide uses for input_file.
  • The review now finishes before the finally block deletes the uploaded file. Before, the stream had only just started when the file was deleted.

package.json

  • openai goes from 4.55.5 to 4.104.0, the last 4.x release. The Responses API needs 4.87.0 or later.

Testing

  • Every changed file parses, and no beta.assistants / beta.threads calls are left.
  • In a clean container: npm ci, npm test (26 passed, 1 skipped, eslint and prettier clean) and npm run build (tsc -b) all pass against openai 4.104.0.
  • Not run: a real resume review in Discord, which needs the bot on a server.

Worth a look

  • Model: the assistant's model was set on OpenAI's side, so I couldn't see it. This uses gpt-5.6-terra; change RESUME_MODEL if you used something else.
  • The instructions say "Consult your knowledge for tips on resume formatting". If the assistant had knowledge files attached, that vector store isn't wired in here. Adding tools: [{ type: "file_search", vector_store_ids: [...] }] would bring it back.
  • package-lock.json is regenerated for openai 4.104.0 and included.

Drafted with Claude (claude-opus-5-5). I reviewed and tested it, and I'm responsible for it. I'm building a tool that finds deprecated API calls.

If you'd rather not get PRs like this, close it or say so and I won't send more to this repo or org.

🤖 Generated with Claude Code

OpenAI shut down the Assistants API on 2026-08-26. The resume review in
src/features/resume.ts now makes one responses.create call with the PDF
as an input_file, and openai goes from 4.55.5 to 4.104.0. See the PR
description for details.

Assisted-by: Claude:claude-opus-5-5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant