Fix/chat for pzz - #23
Merged
Merged
Conversation
Add POST /tasks/classify-only/chat/stream — the classify-only counterpart of
the upload chat flow. It grounds the conversational answer in a new
classifier-candidate summary (top-1/top-5 VRI per object) emitted as a
`classify_summary` SSE event, instead of the object-zone-fit report.
- tasks.py: build_classify_summary_response + GET /tasks/{id}/classify-summary;
task_stream_with_chat_generator gains report_kind ("object_zone_fit" |
"classify") selecting the grounding report and its SSE event.
- classifier.py: rename POST /tasks/chat/stream -> /tasks/pzz-check/chat/stream
for symmetry with classify-only; keep the old path as a deprecated alias on
the same handler so existing frontends keep working.
- docs + tests updated.
Build .env.development from two Actions variables (non-sensitive app params and service URLs, editable inline in the UI) plus one secret (credentials), instead of a single ENV_FILE blob. Concatenated ENV_APP + ENV_URLS + ENV_SECRET, secret last so a credential wins on any dup. Legacy ENV_FILE / ENV_PATH kept as fallbacks so existing deploys keep working until the switch.
Add /admin/config/* to view, set and delete app params and service URLs at
runtime without a redeploy, guarded by the ADMIN_API_TOKEN shared secret
(X-Admin-Token header).
Overrides persist to a new config_override table (shared by every container) and
each process syncs them into its own os.environ on a short TTL, busting the
Settings cache — so api / worker / worker_llm and the pipeline subprocess (which
inherits os.environ) all pick up changes within a few seconds. Credentials and
boot-only keys are never overridable or shown unmasked; a bad value is rejected
(pre-validated against Settings) without clobbering an existing override; any DB
hiccup falls back to the deployed env.
- models.py + alembic 0002: config_override table
- infrastructure/config_runtime.py: store + os.environ sync (TTL, DENY-list)
- settings.py: split get_settings (override-aware) / _build_settings_cached;
ADMIN_API_TOKEN setting
- dependencies.get_app_settings: return live settings so the API is override-aware
- runners/pipeline_runner: apply overrides before spawning the subprocess
- api/admin_config.py: GET settings/overrides/{key}, PUT/DELETE/{key}, POST reload
- tests + README
- clients.py: the embedding vectorizer now reads EMBED_MODEL instead of a separate VECTORIZER_MODEL (same value, one source of truth). - clients.py: CLIENT_CERT_PATH / CLIENT_KEY_PATH / CA_CERT_PATH are read via a null-safe getter, so they can be omitted from env. mTLS only ever applied to https endpoints (a no-op over the internal http GPU URLs); the cert logic stays dormant and re-activates if the vars are set again. - workflow: drop the now-dead "Copy keys" step (KEYS_PATH) — those certs are unused over http. Remove the KEYS_PATH repo secret separately if desired. Lets ENV_APP shed VECTORIZER_MODEL + the three cert-path vars.
1. Fix for broken vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.