Skip to content

runtime API: PATCH /v1/threads/{id} should accept more fields than just archived #562

@Hmbown

Description

@Hmbown

Summary

PATCH /v1/threads/{id} currently accepts only { "archived": true|false }. Whalescale needs per-turn overrides (model, reasoning effort, etc.) and other thread metadata edits without going through a full thread recreate.

Scope

Extend the patch handler in crates/tui/src/runtime_api.rs (currently around update_thread) to accept additional optional fields:

  • title (rename)
  • model_override (per-thread default)
  • reasoning_effort_override
  • system_prompt_override (additive)

Each missing in body = no change. Validate inputs and reject unknown fields with a 400.

Tracks

  • whalescale#256 — PATCH /v1/threads accepts only archived (workaround: per-turn override)
  • Umbrella: whalescale#228

Acceptance

  • New fields persisted via runtime_threads.rs (bump schema_version if storage shape changes).
  • Updated request shape documented in docs/RUNTIME_API.md.
  • Existing { "archived": ... } calls still work unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.10Targeting v0.8.10

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions