You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/08/28 06:49:41 UTC
(maka) branch main updated: fix(core): add DeepSeek V4 Flash Vision to model metadata (#3605)
This is an automated email from the ASF dual-hosted git repository.
Astro-Han pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/main by this push:
new 173cb1b0f fix(core): add DeepSeek V4 Flash Vision to model metadata (#3605)
173cb1b0f is described below
commit 173cb1b0fb80fe41dd6900112a9dfc738b810e1c
Author: Yunare Maia <yu...@gmail.com>
AuthorDate: Fri Aug 28 03:49:36 2026 -0300
fix(core): add DeepSeek V4 Flash Vision to model metadata (#3605)
* fix(core): add DeepSeek V4 Flash Vision to model metadata
deepseek-v4-flash-vision-exp is returned by the first-party /models
endpoint but was absent from STATIC_MODEL_METADATA, causing Maka to
classify it as text-only and filter image attachments before the
request reaches the provider.
Add the model ID with vision capability to both STATIC_MODEL_METADATA
and CURATED_CATALOG_FALLBACK_MODELS so the existing DeepSeek adapter
passes image content through.
Fixes: #3417
Signed-off-by: Yunare Maia <yu...@gmail.com>
* style: apply biome formatting to model metadata (CI fix)
* fix(core): include 'low' effort for deepseek-v4-flash-vision-exp
Per review: models.dev (refreshed 2026-08-21), the official Thinking Mode
guide, and the deepseek-v4-pro entry all confirm low/high/max. The pinned
['high','max'] was inherited from the stale pre-0731 sibling entry.
* fix(core): declare text/image modalities for deepseek-v4-flash-vision-exp
Add the explicit modalities entry suggested in review so attachment
routing sees image input without relying on generated snapshots, and
add a focused regression test covering vision resolution, input
modalities, and fallback-catalog presence for the bare model id.
Co-authored-by: Yunare Maia <yu...@gmail.com>
* chore: re-trigger CI after upstream main repair (#3796)
* fix(core): add displayName, description, lastUpdated for deepseek-v4-flash-vision-exp
Addresses reviewer feedback on #3605: adds displayName, description, and lastUpdated
fields to the STATIC_MODEL_METADATA entry so the model picker shows a friendly name
instead of the bare model ID.
Co-authored-by: Astro-Han <As...@users.noreply.github.com>
* style(core): biome format model-metadata.ts (description line wrap)
* test(core): add regression tests for DeepSeek V4 Flash Vision metadata
- Added tests to verify vision support, modalities, and metadata lookup
- Added catalog test for V4 vision model display metadata
- Fixes reviewer feedback on #3605
* fix(test): remove buildConnectionModelCatalogEntries import from model-metadata.test.ts
The function is exported from model-catalog.ts, not model-metadata.ts.
Local vitest runs pass because it compiles differently than tsc.
---------
Signed-off-by: Yunare Maia <yu...@gmail.com>
Co-authored-by: Astro-Han <As...@users.noreply.github.com>
---
packages/core/src/__tests__/model-catalog.test.ts | 31 ++++++++++
packages/core/src/__tests__/model-metadata.test.ts | 67 ++++++++++++++++++++++
packages/core/src/model-metadata.ts | 21 ++++++-
3 files changed, 118 insertions(+), 1 deletion(-)
diff --git a/packages/core/src/__tests__/model-catalog.test.ts b/packages/core/src/__tests__/model-catalog.test.ts
index 85ac3287b..81b36bbff 100644
--- a/packages/core/src/__tests__/model-catalog.test.ts
+++ b/packages/core/src/__tests__/model-catalog.test.ts
@@ -351,3 +351,34 @@ test('Alibaba (China) catalogs Qwen3.8 Max as the default model on the China end
assert.deepEqual(model?.modalities, { input: ['text', 'image', 'pdf'], output: ['text'] });
assert.equal(model?.canUseAsChatDefault, true);
});
+
+test('DeepSeek catalogs the V4 vision model display metadata from a bare provider id', () => {
+ const modelId = 'deepseek-v4-flash-vision-exp';
+ const [model] = buildConnectionModelCatalogEntries({
+ connection: {
+ slug: 'deepseek',
+ providerType: 'deepseek',
+ defaultModel: modelId,
+ models: [{ id: modelId }],
+ modelSource: 'fetched',
+ },
+ });
+
+ assert.equal(model?.displayName, 'DeepSeek-V4-Flash-Vision-Exp');
+ assert.equal(
+ model?.description,
+ 'Experimental DeepSeek V4 Flash model for image understanding and multimodal agent tasks',
+ );
+ assert.equal(model?.docsUrl, 'https://api-docs.deepseek.com/guides/vision/');
+ assert.equal(model?.contextWindow, 1_000_000);
+ assert.equal(model?.maxOutputTokens, 384_000);
+ assert.equal(model?.structuredOutput, true);
+ assert.equal(model?.lastUpdated, '2026-08-21');
+ assert.deepEqual(model?.capabilities, {
+ reasoning: true,
+ functionCalling: true,
+ vision: true,
+ });
+ assert.deepEqual(model?.modalities, { input: ['text', 'image'], output: ['text'] });
+ assert.equal(model?.canUseAsChatDefault, true);
+});
diff --git a/packages/core/src/__tests__/model-metadata.test.ts b/packages/core/src/__tests__/model-metadata.test.ts
index 9eb6090bf..32f543b78 100644
--- a/packages/core/src/__tests__/model-metadata.test.ts
+++ b/packages/core/src/__tests__/model-metadata.test.ts
@@ -20,8 +20,10 @@
import { strict as assert } from 'node:assert';
import { describe, it } from 'node:test';
import {
+ curatedCatalogFallbackModelsForProvider,
lookupModelMetadata,
openAiAdapterApiProtocol,
+ resolveModelInputModalities,
resolveModelVisionSupport,
} from '../model-metadata.js';
import type { ModelInfo, ProviderType } from '../llm-connections.js';
@@ -105,3 +107,68 @@ describe('openAiAdapterApiProtocol', () => {
assert.equal(openAiAdapterApiProtocol('minimax-m3', 'opencode-go'), 'openai-chat');
});
});
+
+describe('deepseek v4 flash vision exp metadata regression', () => {
+ it('resolves the bare model id with vision support', () => {
+ assert.equal(
+ resolveModelVisionSupport('deepseek', undefined, 'deepseek-v4-flash-vision-exp'),
+ true,
+ );
+ });
+
+ it('accepts both text and image input modalities', () => {
+ const input = resolveModelInputModalities(
+ 'deepseek',
+ undefined,
+ 'deepseek-v4-flash-vision-exp',
+ );
+ assert.ok(input.includes('text'));
+ assert.ok(input.includes('image'));
+ });
+
+ it('keeps the model present in the deepseek fallback catalog', () => {
+ assert.ok(
+ curatedCatalogFallbackModelsForProvider('deepseek')?.includes('deepseek-v4-flash-vision-exp'),
+ );
+ });
+
+ it('returns expected metadata from lookupModelMetadata', () => {
+ const modelId = 'deepseek-v4-flash-vision-exp';
+ const metadata = lookupModelMetadata('deepseek', modelId);
+
+ assert.equal(metadata.displayName, 'DeepSeek-V4-Flash-Vision-Exp');
+ assert.equal(
+ metadata.description,
+ 'Experimental DeepSeek V4 Flash model for image understanding and multimodal agent tasks',
+ );
+ assert.equal(metadata.docsUrl, 'https://api-docs.deepseek.com/guides/vision/');
+ assert.equal(metadata.contextWindow, 1_000_000);
+ assert.equal(metadata.maxOutputTokens, 384_000);
+ assert.equal(metadata.structuredOutput, true);
+ assert.equal(metadata.lastUpdated, '2026-08-21');
+ assert.deepEqual(metadata.thinkingOptions, {
+ efforts: ['low', 'high', 'max'],
+ toggle: true,
+ });
+ assert.equal(metadata.capabilities?.vision, true);
+ assert.deepEqual(metadata.modalities, { input: ['text', 'image'], output: ['text'] });
+ });
+
+ it('is recognized from a bare discovered id', () => {
+ const modelId = 'deepseek-v4-flash-vision-exp';
+ const discovered: ModelInfo[] = [{ id: modelId }];
+ const metadata = lookupModelMetadata('deepseek', modelId);
+
+ assert.equal(metadata.displayName, 'DeepSeek-V4-Flash-Vision-Exp');
+ assert.equal(metadata.capabilities?.vision, true);
+ assert.deepEqual(resolveModelInputModalities('deepseek', discovered, modelId), [
+ 'text',
+ 'image',
+ ]);
+ assert.equal(resolveModelVisionSupport('deepseek', discovered, modelId), true);
+ assert.equal(
+ resolveModelVisionSupport('deepseek', [{ id: 'deepseek-v4-flash' }], 'deepseek-v4-flash'),
+ false,
+ );
+ });
+});
diff --git a/packages/core/src/model-metadata.ts b/packages/core/src/model-metadata.ts
index 5949b79fa..79afdd0da 100644
--- a/packages/core/src/model-metadata.ts
+++ b/packages/core/src/model-metadata.ts
@@ -435,6 +435,19 @@ const STATIC_MODEL_METADATA: Partial<Record<ProviderType, Record<string, ModelMe
lastUpdated: '2026-08-24',
thinkingOptions: { efforts: ['low', 'high', 'max'], toggle: true },
},
+ 'deepseek-v4-flash-vision-exp': {
+ capabilities: { vision: true, ...REASONING_FUNCTION_CALLING, webSearch: true },
+ thinkingOptions: { efforts: ['low', 'high', 'max'], toggle: true },
+ modalities: { input: ['text', 'image'], output: ['text'] },
+ displayName: 'DeepSeek-V4-Flash-Vision-Exp',
+ description:
+ 'Experimental DeepSeek V4 Flash model for image understanding and multimodal agent tasks',
+ docsUrl: 'https://api-docs.deepseek.com/guides/vision/',
+ contextWindow: 1_000_000,
+ maxOutputTokens: 384_000,
+ structuredOutput: true,
+ lastUpdated: '2026-08-21',
+ },
'deepseek-v4-pro': {
capabilities: { ...REASONING_FUNCTION_CALLING, webSearch: true },
lastUpdated: '2026-08-13',
@@ -580,7 +593,13 @@ const CURATED_CATALOG_FALLBACK_MODELS: Partial<Record<ProviderType, readonly str
'claude-sonnet-4-5-20250929',
],
openai: ['gpt-5.5', 'gpt-5.5-pro', 'gpt-5.4', 'gpt-5.4-mini', 'gpt-5'],
- deepseek: ['deepseek-v4-flash', 'deepseek-v4-pro', 'deepseek-reasoner', 'deepseek-chat'],
+ deepseek: [
+ 'deepseek-v4-flash',
+ 'deepseek-v4-flash-vision-exp',
+ 'deepseek-v4-pro',
+ 'deepseek-reasoner',
+ 'deepseek-chat',
+ ],
google: ['gemini-3.5-flash', 'gemini-3.1-pro-preview', 'gemini-2.5-pro', 'gemini-2.5-flash'],
'zai-coding-plan': ['glm-5.2', 'glm-5.1', 'glm-5-turbo', 'glm-4.7', 'glm-4.5-air'],
MiniMax: ['MiniMax-M3'],
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org