v0.7.5: arrow keys, image request fix, deepseek-flash vision, musl CI
TUI keys: register both CSI and SS3 forms of the cursor/Home/End keys and
the xterm modifier sequences when terminfo lacks them, so an arrow sent in
the "other" form no longer turns into Esc + a typed letter. Up/Down move by
visual (soft-wrapped) row, and the draft survives a trip through history.
scripts/tui_keys drives the TUI in a pty to check all of this.
Images: text inside a multimodal content array is now a {"type":"text"}
part; DeepSeek rejected the bare string with HTTP 422. deepseek-flash
(and its deepseek-chat / deepseek-reasoner aliases) read images, so the
registry marks them vision; deepseek-v4-pro stays text only.
CI: models.c lost _DEFAULT_SOURCE in 0.7.0 and gmtime_r broke the musl
build; tests sleep with poll() instead of usleep for the same reason.
This commit is contained in:
@@ -44,6 +44,10 @@ static void test_builtin(void) {
|
||||
EXPECT(mi.has_price && mi.price.miss == 9.0 && mi.price.offpeak_half,
|
||||
"longer match wins the price");
|
||||
EXPECT(strcmp(mi.source, "built-in") == 0, "source built-in");
|
||||
cst_model_info("deepseek", "deepseek-flash", &mi);
|
||||
EXPECT(mi.context == 1000000 && mi.vision == 1, "deepseek-flash takes images");
|
||||
cst_model_info("deepseek", "deepseek-chat", &mi);
|
||||
EXPECT(mi.vision == 1, "deepseek-chat is deepseek-flash");
|
||||
cst_model_info(NULL, "gpt-4o-mini-2024", &mi);
|
||||
EXPECT(mi.price.miss == 0.15 && mi.context == 128000 && mi.vision == 1,
|
||||
"gpt-4o-mini over gpt-4o");
|
||||
@@ -152,7 +156,7 @@ static void test_cache(void) {
|
||||
strcmp(mi.price.currency, "$") == 0,
|
||||
"API vision and USD price");
|
||||
cst_model_info("deepseek", "deepseek-flash", &mi);
|
||||
EXPECT(mi.vision == 0 && mi.price.miss == 2.0,
|
||||
EXPECT(mi.price.miss == 2.0 && strcmp(mi.price.currency, "¥") == 0,
|
||||
"another provider's cache is not used");
|
||||
EXPECT(cst_model_context_tokens("anthropic/claude-sonnet-4") == 1000000,
|
||||
"no provider: any cache, exact id");
|
||||
|
||||
Reference in New Issue
Block a user