v0.7.0: image input, model registry, prefix-cache savings
Images - vision gate: text-only models get a note instead of image parts and no view_image tool; unknown models retry once without images on HTTP 400 - paste: Ctrl+V and /attach paste read the clipboard (wl-paste, xclip, pngpaste/osascript, Win32 PNG or CF_DIB converted to PNG); pasting image file paths attaches them - MCP image content is stored in the session and sent with the tool result - attach: rel path validation, base64 decode, /retry keeps images Model registry - built-in src/models_builtin.json embedded at build time, merged with <config>/models.json and cached GET /models metadata (context, vision, pricing); most specific rule wins per field - /model labels, /status source, --list-models [provider] Cache and cost - stable request prefix (frozen tools, notes as messages), DeepSeek prefix completion, OpenAI/Anthropic cache hints, /cost and hit rate in the status
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "cJSON.h"
|
||||
#include "cst_agent.h"
|
||||
#include "cst_attach.h"
|
||||
#include "cst_sandbox.h"
|
||||
#include "cst_util.h"
|
||||
#include "os_compat.h"
|
||||
@@ -26,6 +27,9 @@ void cst_tool_result_free(cst_tool_result_t *r) {
|
||||
free(r->out);
|
||||
r->out = NULL;
|
||||
r->out_len = 0;
|
||||
cst_attachments_free(r->attach, r->nattach);
|
||||
r->attach = NULL;
|
||||
r->nattach = 0;
|
||||
}
|
||||
|
||||
void cst_tool_call_clear(ctl_tool_call_t *c) {
|
||||
|
||||
Reference in New Issue
Block a user