33 Commits
Author SHA1 Message Date
linshen bfd1543110 feat: refresh built-in model catalog 2026-09-10 16:42:28 +08:00
linshen bb79051a88 fix: add gpt-image-2 high-resolution sizes 2026-08-13 22:22:58 +08:00
linshen 69a636921e feat: refresh built-in provider models 2026-08-13 22:13:54 +08:00
李超 9ed01ce237 Fixed the OpenAI error when calling large image models: Unknown parameter: 'response_format'. (request id: 202606030925559064897917EvHxr7G) 2026-06-03 10:12:58 +08:00
linshen 74c229a8f5 refactor(model): normalize model config identity 2026-05-16 16:47:18 +08:00
linshen b691f4f2c1 fix(core): keep local providers disabled by default
- Keep no-key and local model sources disabled until explicit user configuration exists.
- Tighten default text and image model enablement checks.
- Cover environment-driven defaults for local providers.
2026-05-16 09:47:21 +08:00
linshen 684a7bf4c1 feat(provider): add Grok text and image support
- Add first-class xAI/Grok text and image adapters with dynamic model fallback.
- Register defaults, env mapping, docs, locale labels, and legacy converter handling.
- Cover Grok request payloads, image defaults, registry behavior, and input image limit checks.
2026-05-15 20:43:18 +08:00
linshen 5e942ca945 feat: polish provider controls and themed UI
- Add provider pill selection and normalized provider display copy

- Adopt themed tooltips, confirmation dialogs, and Naive UI surface styles

- Enable Prompt Garden thumbnail previews through shared image preview components
2026-05-14 21:18:43 +08:00
linshen f25837b6cb feat(ui): polish workspace controls and source cues
- Link test source cues back to prompt panel areas

- Add source-linked cards, variant tags, and feedback composables

- Add image model quick switching and workspace control polish
2026-05-12 21:36:52 +08:00
linshen 9711acb424 feat(image): support OpenAI multi-image edits 2026-05-09 20:47:39 +08:00
linshen 50b05a0868 fix: normalize LLM image inputs 2026-05-06 23:37:23 +08:00
linshen d2e1473658 feat(core): refresh openai image provider models 2026-04-26 22:47:54 +08:00
linshen 2e119a6d83 fix(core): align seedream image model capabilities 2026-04-20 22:26:52 +08:00
linshen 7d2e17c3e2 fix(core): force seedream base64 image responses 2026-04-06 23:19:53 +08:00
linshen 1fe25fbd6c fix(core): allow multi-image requests past stale capabilities 2026-04-06 14:13:30 +08:00
linshen d8d252eed6 fix(image): preserve multi-image inputs across runtime and storage
- include ordered OpenRouter multi-image parts in provider payloads
- persist multi-image session inputs as asset references instead of inline payloads
- restore ordered inputs from storage and cover the persistence path with tests
2026-04-06 14:13:28 +08:00
linshen 90b957c983 feat(image): deliver multi-image generation workflow
- add multi-image request types, routing, favorites integration, and desktop bridges
- support multimodal streaming prompt optimization with ordered image inputs
- enable Seedream multi-image generation and redesign the multi-image workspace
- add coverage for routing, persistence, workspace guards, and end-to-end flows
2026-04-06 14:13:28 +08:00
linshen b6fbc21c08 fix(image): stabilize cloudflare-backed reference flow
- Align Cloudflare model defaults, metadata, and connection labels across core and UI
- Add transient retry handling for Cloudflare image requests
- Harden reference prompt normalization and extend related regression coverage
2026-04-01 21:07:29 +08:00
linshen 24f2567c56 feat(core): add Cloudflare image and text providers
- add a Workers AI image adapter for FLUX.2 [klein] 4B generation and editing
- add a Cloudflare text adapter with dynamic model discovery and a Qwen3 default
- load Cloudflare token and account defaults from environment variables for both providers
- cover registry integration and default config wiring with unit tests

(cherry picked from commit 3ef9bdbd187ef150d331ef6b9b46f9d7ad3ef2af)
2026-03-29 19:26:38 +08:00
Prashant Jainandlinshen 6e028c738f feat(core): enable dynamic model fetching for Gemini image adapter (#268)
* feat(core): enable dynamic model fetching for Gemini image adapter

Implement getModelsAsync() in GeminiImageAdapter to dynamically fetch
available image models from the Gemini API, so new models appear without
code changes. Falls back to static list on failure.

* fix(core): restrict Gemini image models to generateContent-compatible families

---------

Co-authored-by: linshen <32978552+linshenkx@users.noreply.github.com>
2026-03-11 22:21:03 +08:00
linshen 52791eb51e test(core): fix modelscope image test input ref 2026-02-27 21:23:49 +08:00
linshen 038a2d5343 feat(core): add Ollama adapters
Ollama can be deployed with proper CORS/reverse-proxy, so we avoid hard-marking it as browser-blocked and backfill legacy metadata.
2026-02-04 20:17:00 +08:00
linshen 837702e769 fix(core): switch OpenRouter image default to gemini-2.5-flash-image 2026-01-27 23:57:38 +08:00
linshen 03a62630bd fix(i18n): align core errors to structured codes
- Normalize IPC/plain-object errors via toErrorWithCode
- Align image adapter + storage config errors to i18n codes
- Add missing UI locale keys and update tests
2026-01-20 22:23:00 +08:00
linshen c8f5a2dec8 fix(core): format dashscope image2image input as data url 2026-01-19 22:04:06 +08:00
linshen 007a37e26a feat(core): structured image errors and adapters
- Add structured image error codes and types\n- Update image adapters and service surface for explicit requests\n- Update core tests and vitest configuration
2026-01-18 10:08:00 +08:00
linshen 8467b96263 feat(test): 实现智能测试系统并改进测试策略
- 实现智能测试系统,统一测试入口
- 完成 Pro 路由重构和 Image 模式评估测试
- 为 Image 模式添加 data-testid 支持
- 完善 E2E 测试并修复选择器策略
- 优化 Seedream、OpenAI 和 SiliconFlow 适配器
- 移除调试日志,保留错误和警告日志
- 重命名 Pro 模式子模式(system/user → multi/variable)
- 清理测试代码并改进稳定性
2026-01-10 11:23:00 +08:00
linshenandClaude Sonnet 4.5 130b8fa880 feat(core): 新增 ModelScope(魔搭)API 集成支持
新增 ModelScope LLM 和图像生成服务的完整支持,包括:

LLM 适配器特性:
- 基于 OpenAI 兼容 API 实现,继承 OpenAIAdapter
- 支持动态获取模型列表(models.list() 返回 62 个模型)
- 内置 Qwen/Qwen3-Coder-480B-A35B-Instruct 静态模型
- 支持聊天和流式响应
- 每天免费 2000 次调用

图像生成适配器特性:
- 实现异步任务提交和轮询机制
- 支持文生图(text-to-image)功能
- 内置 Z-Image-Turbo 模型
- 增强的错误处理和状态管理
- 使用 resolveEndpointUrl() 确保 URL 规范化

技术改进:
- 正确处理自定义 baseURL 的 /v1 路径规范化
- 完善的轮询错误处理(SUCCEED/FAILED/ERROR/CANCELLED)
- 错误响应体解析,提供详细错误信息
- 处理未知终态,避免超时等待

测试覆盖:
- LLM 适配器单元测试(7 个测试用例)
- 图像适配器单元测试(7 个测试用例,包括真实 API 测试)
- 集成测试覆盖真实 API 调用和流式响应

配置集成:
- 环境变量支持:VITE_MODELSCOPE_API_KEY
- 自动注册到 LLM 和图像服务 registry
- 默认配置自动生成和启用

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 23:34:25 +08:00
linshen df52b32366 feat(evaluation): 重构评估响应结构,新增 patchPlan 精准修复功能
- 评估响应用 patchPlan 替代 issues,支持 insert/replace/delete 操作
- 新增 patch-plan 工具处理文本补丁应用
- 模板统一输出结构:score + improvements + patchPlan + summary
- UI 新增"立即替换"按钮,支持 diff 可视化展示
- usePromptOptimizer 新增 saveLocalEdit 保存本地编辑为新版本
- originalPrompt/testContent 改为可选,提升灵活性
2025-12-25 23:36:00 +08:00
linshen 1f1f6bcc1d feat(core): 新增 OpenRouter 文本模型适配器
- 创建 OpenRouterAdapter 继承 OpenAIAdapter
- 默认模型为 qwen/qwen3-235b-a22b:free
- 预置三个免费模型:Qwen3、Gemini 2.0 Flash、DeepSeek Chat V3
- 在 PROVIDER_ENV_KEYS 中添加 openrouter 配置
- 更新测试预期 Provider 数量
2025-12-06 17:04:56 +08:00
linshen d0bbd71efd feat(image): 支持配置 Gemini 适配器的基础 URL
- 移除对 setDefaultBaseUrls 的依赖
- 在连接配置中添加可选的 baseURL 字段
- 支持通过 httpOptions.baseUrl 传递自定义基础 URL
- 更新测试用例以验证新字段的可用性与类型定义
- 确保默认行为不受影响,保持向后兼容性
- 标准化基础 URL 处理逻辑,提升代码健壮性
2025-10-08 17:00:16 +08:00
linshen ba63eff9ad feat: 重构图像模型管理架构并优化用户界面
## 核心改进

### 🏗️ 架构重构
- 实现ImageModelManager组件分离设计,关注点明确分离
- 重构ModelManager.vue为统一模型管理入口,支持文本/图像双模式
- 采用组件复用和扩展性设计,易于添加新模型类型

### 🎨 界面优化
- 摒弃5步导航式编辑,改为一体化界面设计
- 优化ImageModelEditModal为单页滚动布局,提升操作效率
- 统一文本和图像模型管理的交互体验和视觉风格

### 🔌 适配器扩展
- 新增OpenRouter和SiliconFlow图像适配器支持
- 完善AbstractImageProviderAdapter抽象基类设计
- 优化适配器注册表和动态模型发现机制

### 💻 类型系统
- 完善ImageModelConfig和相关类型定义
- 增强TypeScript类型安全和智能提示
- 优化服务层接口设计和依赖注入架构

### 🧪 测试覆盖
- 新增图像适配器单元测试和集成测试
- 添加E2E验收测试保证功能完整性
- 增强连接测试和参数验证测试覆盖

### 📚 文档完善
- 新增图像模型管理架构设计文档
- 添加一体化界面改进方案文档
- 更新项目结构和开发指南

## 技术特点

- **SOLID原则**:清晰的单一职责和开闭扩展设计
- **组合模式**:ImageModelManager + ModelManager.vue 组合架构
- **响应式设计**:基于Vue 3 Composition API的状态管理
- **依赖注入**:松耦合的服务架构和组件通信

这次重构显著提升了图像模型管理的用户体验和代码可维护性,
为后续音频、视频等多模态功能扩展奠定了坚实基础。
2025-09-21 20:17:03 +08:00
linshen 2ffb7556ee feat: 实现图像模式与多模态功能架构
- 新增图像模式支持文生图(T2I)和图生图(I2I)功能
- 实现图像服务层,支持Gemini/Seedream/OpenAI等多适配器
- 升级功能模式架构:basic/pro/image三重模式系统
- 新增图像模型管理器与专用UI组件
- 优化存储键管理,统一图像模式相关配置
- 完善国际化支持,新增图像模式相关翻译
- 增强模型管理器,支持文本/图像双模型管理
2025-09-20 21:55:26 +08:00