summaryrefslogtreecommitdiff
path: root/libpanto-c/include
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-12 10:38:28 -0600
committert <t@tjp.lol>2026-06-12 11:06:18 -0600
commit7343898524f9f692620f4cb276f56cfde30f6269 (patch)
tree8cf0621d33c4ae7f292c95f4684e1e9590175ae8 /libpanto-c/include
parentaf8ba87475bfae9c1b4fa70c88fb4c59630a5670 (diff)
fuzzy selectors for models and reasoning levels
Diffstat (limited to 'libpanto-c/include')
-rw-r--r--libpanto-c/include/panto.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpanto-c/include/panto.h b/libpanto-c/include/panto.h
index 94ddcb9..d0c272f 100644
--- a/libpanto-c/include/panto.h
+++ b/libpanto-c/include/panto.h
@@ -115,6 +115,12 @@ PANTO_EXPORT PantoStatus panto_agent_add_system_message(PantoAgent *agent, const
PANTO_EXPORT PantoStatus panto_agent_set_system_prompt(PantoAgent *agent, const char *text);
PANTO_EXPORT PantoStatus panto_agent_compact(PantoAgent *agent, const char *override_system_prompt, const char *extra_instructions, PantoCompactionResult *out);
PANTO_EXPORT PantoStatus panto_agent_run(PantoAgent *agent, const char *user_text, PantoStream **out);
+/* Reset a failed stream back to its turn-open boundary so the caller can
+ * resume panto_stream_next() after changing the agent config (e.g. catch a
+ * terminal bad-request, swap the provider config, and retry the SAME turn
+ * without re-appending the user message). Errors if the stream has not
+ * failed. */
+PANTO_EXPORT PantoStatus panto_stream_reopen(PantoStream *stream);
PANTO_EXPORT void panto_stream_destroy(PantoStream *stream);
PANTO_EXPORT PantoNextStatus panto_stream_next(PantoStream *stream, PantoEvent *out);
PANTO_EXPORT void panto_event_free(PantoEvent *event);