[MISC] Decommission prompt-service, old tools, SDK1 prompt module#1978
[MISC] Decommission prompt-service, old tools, SDK1 prompt module#1978harini-venkataraman wants to merge 3 commits into
Conversation
… (Phase 5) Remove prompt-service source, Dockerfiles, and docker-compose entries. Remove tools/classifier, tools/structure, tools/text_extractor directories. Remove SDK1 prompt.py module and its tests. Clean up PROMPT_HOST/PROMPT_PORT from backend settings, sample envs, docker configs, and CI workflows. Remove prompt-service from uv-lock scripts and production build workflow. Co-Authored-By: Claude Opus 4.6 <[email protected]>
The prompt-service directory was deleted in the prior commit but tox.ini still referenced it, which would break CI test runs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
WalkthroughThis PR removes the ChangesPrompt Service Removal
🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
for more information, see https://pre-commit.ci
|
Test ResultsSummary
Runner Tests - Full Report
SDK1 Tests - Full Report
|
|
| Filename | Overview |
|---|---|
| docker/docker-compose.yaml | Removes prompt-service block and its depends_on entry from the backend service; remaining service graph is self-consistent. |
| unstract/workflow-execution/src/unstract/workflow_execution/tools_utils.py | Removes prompt_host/prompt_port attributes from ToolsUtils and their entries in the env-variable map passed to tool containers; no remaining callers. |
| unstract/sdk1/src/unstract/sdk1/utils/retry_utils.py | Removes retry_prompt_service_call pre-configured decorator; docstring on line 280 still references prompt-service but this is a comment-only stale reference. |
| .github/workflows/production-build.yaml | Removes prompt-service from the build matrix and decrements TOTAL_SERVICES from 7 to 6; summary loop and table updated consistently. |
| .github/workflows/docker-tools-build-push.yaml | Removes tool-classifier, tool-structure, tool-text-extractor options from the workflow_dispatch input; tool-sidecar set as the new default. |
| tox.ini | Removes prompt-service test environment from env_list and its [testenv:prompt-service] block; remaining environments unaffected. |
| backend/backend/settings/base.py | Removes PROMPT_HOST and PROMPT_PORT settings; no remaining backend code references these variables. |
| workers/sample.env | Removes PROMPT_HOST/PROMPT_PORT entries from both active and commented-out example blocks. |
| docker/scripts/uv-lock-gen/uv-lock.sh | Removes prompt-service from the list of directories managed by the lockfile generator; adjacent README example updated to match. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before (SDK1 + prompt-service)"]
B_Tool["StructureTool / PromptStudio IDE"] -->|HTTP| PS["prompt-service\n(Flask, port 3003)"]
PS --> LLM_B["LLM / Vector Store"]
end
subgraph After["After (Executor Workers)"]
A_Tool["StructureTool / PromptStudio IDE"] -->|Celery task| ED["ExecutionDispatcher"]
ED --> EW["worker-executor-v2\n(legacy_executor.py)"]
EW --> LLM_A["LLM / Vector Store"]
end
subgraph Removed["Removed in this PR"]
R1["prompt-service/ (Flask app)"]
R2["tools/classifier, structure, text_extractor"]
R3["sdk1/prompt.py (PromptTool HTTP client)"]
R4["PROMPT_HOST / PROMPT_PORT env vars"]
R5["prompt.Dockerfile + compose service"]
end
style Before fill:#ffe0e0,stroke:#cc0000
style After fill:#e0ffe0,stroke:#00aa00
style Removed fill:#f5f5f5,stroke:#999
Reviews (1): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker/scripts/uv-lock-gen/README.md`:
- Line 5: The example sentence describing "transitive dependency changes"
references the service "workers" which is not in the enumerated list; update
that sentence to reference an existing listed service (e.g., replace "workers"
with "runner") so the example matches the enumerated services, or alternatively
add "workers" into the enumerated list; locate the sentence containing
"transitive dependency changes" and the example "unstract/sdk1" and make the
replacement/addition accordingly to keep the README consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f274dae7-8d0e-4a6b-935a-8beec240f62e
⛔ Files ignored due to path filters (5)
prompt-service/src/unstract/prompt_service/tests/integration/input/sample1.pdfis excluded by!**/*.pdfprompt-service/uv.lockis excluded by!**/*.locktools/classifier/src/config/icon.svgis excluded by!**/*.svgtools/structure/src/config/icon.svgis excluded by!**/*.svgtools/text_extractor/src/config/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (114)
.github/workflows/docker-tools-build-push.yaml.github/workflows/production-build.yamlbackend/backend/settings/base.pybackend/sample.envdocker/compose.debug.yamldocker/docker-compose.build.yamldocker/docker-compose.yamldocker/dockerfiles/prompt.Dockerfiledocker/dockerfiles/prompt.Dockerfile.dockerignoredocker/sample.compose.override.yamldocker/scripts/uv-lock-gen/README.mddocker/scripts/uv-lock-gen/uv-lock.shprompt-service/.gitignoreprompt-service/.python-versionprompt-service/README.mdprompt-service/entrypoint.shprompt-service/pyproject.tomlprompt-service/sample.envprompt-service/src/unstract/prompt_service/__init__.pyprompt-service/src/unstract/prompt_service/config.pyprompt-service/src/unstract/prompt_service/constants.pyprompt-service/src/unstract/prompt_service/controllers/__init__.pyprompt-service/src/unstract/prompt_service/controllers/answer_prompt.pyprompt-service/src/unstract/prompt_service/controllers/extraction.pyprompt-service/src/unstract/prompt_service/controllers/health.pyprompt-service/src/unstract/prompt_service/controllers/indexing.pyprompt-service/src/unstract/prompt_service/core/index_v2.pyprompt-service/src/unstract/prompt_service/core/retrievers/automerging.pyprompt-service/src/unstract/prompt_service/core/retrievers/base_retriever.pyprompt-service/src/unstract/prompt_service/core/retrievers/fusion.pyprompt-service/src/unstract/prompt_service/core/retrievers/keyword_table.pyprompt-service/src/unstract/prompt_service/core/retrievers/recursive.pyprompt-service/src/unstract/prompt_service/core/retrievers/retriever_llm.pyprompt-service/src/unstract/prompt_service/core/retrievers/router.pyprompt-service/src/unstract/prompt_service/core/retrievers/simple.pyprompt-service/src/unstract/prompt_service/core/retrievers/subquestion.pyprompt-service/src/unstract/prompt_service/dto.pyprompt-service/src/unstract/prompt_service/exceptions.pyprompt-service/src/unstract/prompt_service/extensions.pyprompt-service/src/unstract/prompt_service/helpers/__init__.pyprompt-service/src/unstract/prompt_service/helpers/auth.pyprompt-service/src/unstract/prompt_service/helpers/postprocessor.pyprompt-service/src/unstract/prompt_service/helpers/prompt_ide_base_tool.pyprompt-service/src/unstract/prompt_service/helpers/usage.pyprompt-service/src/unstract/prompt_service/helpers/variable_replacement.pyprompt-service/src/unstract/prompt_service/run.pyprompt-service/src/unstract/prompt_service/services/__init__.pyprompt-service/src/unstract/prompt_service/services/answer_prompt.pyprompt-service/src/unstract/prompt_service/services/extraction.pyprompt-service/src/unstract/prompt_service/services/indexing.pyprompt-service/src/unstract/prompt_service/services/rentrolls_extractor/interface.pyprompt-service/src/unstract/prompt_service/services/retrieval.pyprompt-service/src/unstract/prompt_service/services/variable_replacement.pyprompt-service/src/unstract/prompt_service/tests/conftest.pyprompt-service/src/unstract/prompt_service/tests/integration/test_api_endpoints.pyprompt-service/src/unstract/prompt_service/tests/sample.env.testprompt-service/src/unstract/prompt_service/tests/unit/__init__.pyprompt-service/src/unstract/prompt_service/tests/unit/conftest.pyprompt-service/src/unstract/prompt_service/tests/unit/test_retriever_llm.pyprompt-service/src/unstract/prompt_service/utils/__init__.pyprompt-service/src/unstract/prompt_service/utils/db_utils.pyprompt-service/src/unstract/prompt_service/utils/env_loader.pyprompt-service/src/unstract/prompt_service/utils/file_utils.pyprompt-service/src/unstract/prompt_service/utils/json_repair_helper.pyprompt-service/src/unstract/prompt_service/utils/log.pyprompt-service/src/unstract/prompt_service/utils/metrics.pyprompt-service/src/unstract/prompt_service/utils/request.pytools/classifier/.dockerignoretools/classifier/Dockerfiletools/classifier/README.mdtools/classifier/__init__.pytools/classifier/requirements.txttools/classifier/sample.envtools/classifier/src/config/properties.jsontools/classifier/src/config/runtime_variables.jsontools/classifier/src/config/spec.jsontools/classifier/src/helper.pytools/classifier/src/main.pytools/structure/.dockerignoretools/structure/.gitignoretools/structure/Dockerfiletools/structure/README.mdtools/structure/__init__.pytools/structure/requirements.txttools/structure/sample.envtools/structure/src/config/properties.jsontools/structure/src/config/runtime_variables.jsontools/structure/src/config/spec.jsontools/structure/src/constants.pytools/structure/src/helpers.pytools/structure/src/main.pytools/structure/src/utils.pytools/text_extractor/.dockerignoretools/text_extractor/.gitignoretools/text_extractor/Dockerfiletools/text_extractor/README.mdtools/text_extractor/__init__.pytools/text_extractor/requirements.txttools/text_extractor/sample.envtools/text_extractor/src/config/properties.jsontools/text_extractor/src/config/runtime_variables.jsontools/text_extractor/src/config/spec.jsontools/text_extractor/src/example_package/__init__.pytools/text_extractor/src/main.pytools/text_extractor/tests/__init__.pytox.iniunstract/sdk1/src/unstract/sdk1/prompt.pyunstract/sdk1/src/unstract/sdk1/utils/retry_utils.pyunstract/sdk1/tests/conftest.pyunstract/sdk1/tests/test_prompt.pyunstract/sdk1/tests/utils/test_retry_utils.pyunstract/workflow-execution/src/unstract/workflow_execution/constants.pyunstract/workflow-execution/src/unstract/workflow_execution/tools_utils.pyworkers/sample.env
💤 Files with no reviewable changes (100)
- tools/classifier/src/config/properties.json
- tools/text_extractor/.gitignore
- tools/classifier/.dockerignore
- prompt-service/.gitignore
- prompt-service/sample.env
- docker/dockerfiles/prompt.Dockerfile.dockerignore
- tools/structure/sample.env
- tools/structure/src/config/properties.json
- prompt-service/README.md
- docker/dockerfiles/prompt.Dockerfile
- tools/text_extractor/src/config/properties.json
- tools/text_extractor/README.md
- tools/structure/requirements.txt
- prompt-service/src/unstract/prompt_service/tests/sample.env.test
- tools/classifier/src/config/runtime_variables.json
- prompt-service/entrypoint.sh
- docker/scripts/uv-lock-gen/uv-lock.sh
- tools/classifier/README.md
- tools/classifier/sample.env
- workers/sample.env
- prompt-service/src/unstract/prompt_service/core/retrievers/retriever_llm.py
- prompt-service/src/unstract/prompt_service/core/retrievers/base_retriever.py
- prompt-service/src/unstract/prompt_service/utils/db_utils.py
- tools/structure/src/constants.py
- tools/structure/Dockerfile
- tools/structure/README.md
- prompt-service/src/unstract/prompt_service/services/rentrolls_extractor/interface.py
- tools/text_extractor/src/main.py
- prompt-service/src/unstract/prompt_service/controllers/health.py
- tools/text_extractor/.dockerignore
- tools/text_extractor/src/config/runtime_variables.json
- tools/text_extractor/requirements.txt
- prompt-service/src/unstract/prompt_service/services/indexing.py
- tools/text_extractor/Dockerfile
- prompt-service/src/unstract/prompt_service/tests/unit/test_retriever_llm.py
- unstract/sdk1/src/unstract/sdk1/utils/retry_utils.py
- prompt-service/src/unstract/prompt_service/controllers/init.py
- tools/classifier/src/config/spec.json
- prompt-service/src/unstract/prompt_service/utils/file_utils.py
- prompt-service/src/unstract/prompt_service/tests/integration/test_api_endpoints.py
- prompt-service/src/unstract/prompt_service/utils/log.py
- prompt-service/src/unstract/prompt_service/utils/metrics.py
- prompt-service/src/unstract/prompt_service/extensions.py
- unstract/sdk1/src/unstract/sdk1/prompt.py
- unstract/workflow-execution/src/unstract/workflow_execution/constants.py
- prompt-service/src/unstract/prompt_service/controllers/answer_prompt.py
- tools/structure/src/config/runtime_variables.json
- prompt-service/src/unstract/prompt_service/constants.py
- prompt-service/src/unstract/prompt_service/tests/unit/conftest.py
- tools/structure/.gitignore
- prompt-service/src/unstract/prompt_service/controllers/indexing.py
- tools/classifier/Dockerfile
- prompt-service/src/unstract/prompt_service/services/variable_replacement.py
- tools/structure/src/helpers.py
- tools/structure/src/config/spec.json
- prompt-service/src/unstract/prompt_service/helpers/auth.py
- prompt-service/src/unstract/prompt_service/core/retrievers/keyword_table.py
- tools/text_extractor/src/config/spec.json
- prompt-service/src/unstract/prompt_service/tests/conftest.py
- unstract/sdk1/tests/utils/test_retry_utils.py
- prompt-service/src/unstract/prompt_service/dto.py
- prompt-service/.python-version
- prompt-service/src/unstract/prompt_service/helpers/postprocessor.py
- prompt-service/src/unstract/prompt_service/helpers/usage.py
- docker/docker-compose.build.yaml
- tools/classifier/src/main.py
- backend/sample.env
- prompt-service/src/unstract/prompt_service/exceptions.py
- prompt-service/src/unstract/prompt_service/utils/json_repair_helper.py
- prompt-service/src/unstract/prompt_service/core/retrievers/automerging.py
- unstract/sdk1/tests/conftest.py
- prompt-service/src/unstract/prompt_service/core/index_v2.py
- prompt-service/src/unstract/prompt_service/helpers/prompt_ide_base_tool.py
- tools/text_extractor/sample.env
- prompt-service/src/unstract/prompt_service/services/answer_prompt.py
- prompt-service/src/unstract/prompt_service/core/retrievers/recursive.py
- prompt-service/src/unstract/prompt_service/core/retrievers/subquestion.py
- tools/structure/src/utils.py
- prompt-service/src/unstract/prompt_service/utils/request.py
- docker/compose.debug.yaml
- prompt-service/src/unstract/prompt_service/services/extraction.py
- prompt-service/src/unstract/prompt_service/core/retrievers/router.py
- prompt-service/src/unstract/prompt_service/config.py
- tools/structure/.dockerignore
- prompt-service/src/unstract/prompt_service/controllers/extraction.py
- prompt-service/pyproject.toml
- tools/classifier/src/helper.py
- prompt-service/src/unstract/prompt_service/core/retrievers/simple.py
- tools/classifier/requirements.txt
- docker/docker-compose.yaml
- prompt-service/src/unstract/prompt_service/services/retrieval.py
- prompt-service/src/unstract/prompt_service/run.py
- prompt-service/src/unstract/prompt_service/helpers/variable_replacement.py
- unstract/sdk1/tests/test_prompt.py
- tools/structure/src/main.py
- prompt-service/src/unstract/prompt_service/utils/env_loader.py
- backend/backend/settings/base.py
- prompt-service/src/unstract/prompt_service/core/retrievers/fusion.py
- unstract/workflow-execution/src/unstract/workflow_execution/tools_utils.py
- docker/sample.compose.override.yaml
| Helps generate uv's lockfiles by running `uv sync` on all necessary packages and services. | ||
|
|
||
| It also detects **transitive dependency changes** — if a local path dependency's `pyproject.toml` changed (e.g. `unstract/sdk1`), all services that depend on it (e.g. `backend`, `prompt-service`) will have their lockfiles regenerated too. | ||
| It also detects **transitive dependency changes** — if a local path dependency's `pyproject.toml` changed (e.g. `unstract/sdk1`), all services that depend on it (e.g. `backend`, `workers`) will have their lockfiles regenerated too. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check for workers-related directories and their pyproject.toml files
fd -t d -d 1 'worker' .
echo "---"
# Check if workers or worker-unified has a pyproject.toml
ls -la workers/pyproject.toml worker-unified/pyproject.toml 2>&1 || echo "Neither found"Repository: Zipstack/unstract
Length of output: 239
🏁 Script executed:
cat -n docker/scripts/uv-lock-gen/README.md | head -20Repository: Zipstack/unstract
Length of output: 850
Update the example to match the enumerated service list.
Line 5 mentions workers as an example service, but the enumerated list (lines 7-16) doesn't include it. The list contains: backend, runner, unstract/core, unstract/flags, platform-service, x2text-service, unstract/connectors, and unstract/tool-sandbox.
Either add workers to the list if it should be included, or update the example to reference a service that is already enumerated (e.g., backend, runner).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docker/scripts/uv-lock-gen/README.md` at line 5, The example sentence
describing "transitive dependency changes" references the service "workers"
which is not in the enumerated list; update that sentence to reference an
existing listed service (e.g., replace "workers" with "runner") so the example
matches the enumerated services, or alternatively add "workers" into the
enumerated list; locate the sentence containing "transitive dependency changes"
and the example "unstract/sdk1" and make the replacement/addition accordingly to
keep the README consistent.



What
Phase 5 of the pluggable executor migration — decommission prompt-service, old tools (classifier, structure, text_extractor), and SDK1 prompt module from the OSS repo.
Why
These components have been fully replaced by the executor-based architecture (Phases 1–4). The prompt-service Flask app, old tool containers, and SDK1 prompt module are dead code that adds maintenance burden and CI cost.
How
Safety — preserved items
Can this PR break any existing features? If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
No. All removed components are dead code — prompt-service was replaced by executor workers in Phases 1-4, old tool containers are unused (structure tool routing uses image env vars, not source), and SDK1 prompt.py had no remaining callers. Verified: zero import references to deleted modules, 263 workers tests pass with no regressions.
Relevant Docs
Related Issues or PRs
Dependencies Versions / Env Variables
Removed env vars:
No new dependencies or env vars added.
Notes on Testing
Screenshots
N/A — no UI changes.
Checklist
I have read and understood the Contribution Guidelines.