Repository navigation
Conversation
Remove the deprecated /threads endpoints, the OpenAIThread model, the thread-result CRUD, docs and tests. LangfuseTracer and configure_openai had no other callers left, so they go too. Migration 098 drops the openai_thread table; its downgrade recreates the empty table as it stood at 097.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. Migration 098 permanently deletes the openai_thread rows and the PR removes the public /threads endpoints, so it's worth having a human confirm that both are intended for deployed environments.
What was reviewed:
- The 098 downgrade, compared against migrations 011/040 and the old model: column types, nullability, comments, the PK and the unique
ix_openai_thread_thread_idindex all match the table as it stood at 097. - Leftover references: no Python code under backend/ still uses LangfuseTracer,
_to_usage_details, configure_openai, OpenAIThread, thread_results or the threads router. - The changes to
observe_llm_executionare limited to a comment, and the imports that are still used were kept.
Extended reasoning...
The change deletes about 1,800 lines: the deprecated Threads router, model, CRUD, OpenAPI docs, the LangfuseTracer class, the configure_openai helper and their tests. It also adds migration 098, which drops the openai_thread table, and updates three wiki pages. The security-sensitive surface is none beyond removing endpoints. The code looks mechanically correct and the downgrade schema matches the original. I deferred because the upgrade irreversibly destroys stored thread data and removes a public API, which is a product and operations decision a person should sign off on.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
OpenAPI changes 🔴 25 breaking changesCaution Downstream consumers may need an update before merging. Breaking changes ·
|
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/documents/transformation |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/documents/transformation/{job_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations |
API removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations/datasets |
API removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations/{evaluation_id}/improve-prompt |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/fine_tuning/fine_tune |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/fine_tuning/{document_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/fine_tuning/{fine_tuning_id}/refresh |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/model_evaluation/evaluate_models |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/model_evaluation/{document_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/model_evaluation/{document_id}/top_model |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/ancestor/{ancestor_response_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/response/{response_id} |
API path removed without deprecation |
| 🔴 | DELETE |
/api/v1/openai-conversation/{conversation_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/{conversation_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/responses |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/responses/sync |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/threads/result/{thread_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads/start |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads/sync |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/documents |
removed the request property callback_url |
| 🔴 | POST |
/api/v1/documents |
removed the request property target_format |
| 🔴 | POST |
/api/v1/documents |
removed the request property transformer |
Full changelog · 55
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/documents/transformation |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/documents/transformation/{job_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations |
API removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations/datasets |
API removed without deprecation |
| 🔴 | POST |
/api/v1/evaluations/{evaluation_id}/improve-prompt |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/fine_tuning/fine_tune |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/fine_tuning/{document_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/fine_tuning/{fine_tuning_id}/refresh |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/model_evaluation/evaluate_models |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/model_evaluation/{document_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/model_evaluation/{document_id}/top_model |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/ancestor/{ancestor_response_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/response/{response_id} |
API path removed without deprecation |
| 🔴 | DELETE |
/api/v1/openai-conversation/{conversation_id} |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/openai-conversation/{conversation_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/responses |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/responses/sync |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads |
API path removed without deprecation |
| 🔴 | GET |
/api/v1/threads/result/{thread_id} |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads/start |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/threads/sync |
API path removed without deprecation |
| 🔴 | POST |
/api/v1/documents |
removed the request property callback_url |
| 🔴 | POST |
/api/v1/documents |
removed the request property target_format |
| 🔴 | POST |
/api/v1/documents |
removed the request property transformer |
| 🟢 | — |
— |
removed the schema APIResponse_CallbackResponse_ |
| 🟢 | — |
— |
removed the schema APIResponse_DocTransformationJobPublic_-Input |
| 🟢 | — |
— |
removed the schema APIResponse_DocTransformationJobPublic_-Output |
| 🟢 | — |
— |
removed the schema APIResponse_DocTransformationJobsPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_FineTuningJobPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_ModelEvaluationPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_OpenAIConversationPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_ResponseJobStatus_ |
| 🟢 | — |
— |
removed the schema APIResponse_list_FineTuningJobPublic__ |
| 🟢 | — |
— |
removed the schema APIResponse_list_ModelEvaluationPublic__ |
| 🟢 | — |
— |
removed the schema APIResponse_list_OpenAIConversationPublic__ |
| 🟢 | — |
— |
removed the schema Body_Evaluation-evaluate |
| 🟢 | — |
— |
removed the schema Body_Evaluation-upload_dataset |
| 🟢 | — |
— |
removed the schema Body_Fine_Tuning-fine_tune_from_CSV |
| 🟢 | — |
— |
removed the schema CallbackResponse |
| 🟢 | — |
— |
removed the schema Diagnostics |
| 🟢 | — |
— |
removed the schema DocTransformationJobPublic |
| 🟢 | — |
— |
removed the schema DocTransformationJobsPublic |
| 🟢 | — |
— |
removed the schema FineTuningJobPublic |
| 🟢 | — |
— |
removed the schema ModelEvaluationCreate |
| 🟢 | — |
— |
removed the schema ModelEvaluationPublic |
| 🟢 | — |
— |
removed the schema ModelEvaluationStatus |
| 🟢 | — |
— |
removed the schema OpenAIConversationPublic |
| 🟢 | — |
— |
removed the schema ResponseJobStatus |
| 🟢 | — |
— |
removed the schema ResponsesAPIRequest |
| 🟢 | — |
— |
removed the schema ResponsesSyncAPIRequest |
| 🟢 | — |
— |
removed the schema StartThreadRequest |
| 🟢 | — |
— |
removed the schema TransformationJobInfo |
| 🟢 | — |
— |
removed the schema TransformationStatus |
| 🟢 | POST |
/api/v1/documents |
removed the optional property data/anyOf[subschema #1: DocumentUploadResponse]/transformation_job from the response with the 200 status |
main ↔ 51024c50 · generated by oasdiff
Issue
Closes #1382
What Changed
POST /threads,POST /threads/sync,POST /threads/start,GET /threads/result/{thread_id}openai_threadtable in migration098(revises097). Rows are deleted on upgrade, and downgrade recreates only the empty schema.OpenAIThread/OpenAIThreadBase/OpenAIThreadCreateupsert_thread_result/get_thread_resultLangfuseTracerand_to_usage_detailsconfigure_openaiThreadsOpenAPI tag:deprecated_tagsgoes from["Assistants", "Threads"]to["Assistants"]test_threads.py,test_langfuse_tracer.py,test_thread_result.py. Wiki docs are updated to match.Summary
The Threads module is no longer used, so the route, model, CRUD, tracer and their tests are removed together.
observe_llm_executionstays in place. Its comment no longer points atLangfuseTracer.__init__and now inlines the multi-tenant client note.Evidence
/api/v1/threads*routes are registered, and theopenai_threadtable exists.After: The routes and table are removed. The author ran
fastapi run --reload app/main.py/docker compose uplocally (see checklist).No test output or screenshots are attached. The tests for the removed code are deleted, and no new tests are added.
Merge Danger
Door: one-way
Migration
098dropsopenai_thread, and all rows are lost on upgrade.downgrade()recreates the empty table and theix_openai_thread_thread_idindex so older code can boot. It does not restore the data. Back up the table before deploying if you need to keep its history.Blast Radius: API consumers
/api/v1/threads,/threads/sync,/threads/startor/threads/result/{id}will now get 404.LangfuseTracer,configure_openai,OpenAIThread*or the thread CRUD functions will fail to import.chore/remove-v1-eval-writes. Migration098assumes097is the head, so merge order matters.Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Previous PR description
Issue
Closes #1382
Summary
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes