refactor: narrow web image input v1

This commit is contained in:
Tianyi Cui
2026-07-29 23:18:57 +08:00
parent 8348a409aa
commit 3a4c436d83
69 changed files with 280 additions and 613 deletions
+1 -7
View File
@@ -250,16 +250,10 @@ describe('PiAiAdapter provider routing', () => {
class LateAttachmentStore extends AttachmentStore {
readonly imageLimits: ImageAttachmentLimits = {
maxImageBytes: 1,
maxImagesPerMessage: 1,
maxMessageImageBytes: 1,
maxImagePixels: 1,
mediaTypes: ['image/png'],
}
validateImage(_input: SaveImageAttachment): void {
throw new Error('not used')
}
saveImage(_input: SaveImageAttachment): Promise<ImageAttachmentRef> {
return Promise.reject(new Error('not used'))
}
@@ -440,7 +434,7 @@ describe('provider profile lifecycle', () => {
const models = await ctx.llm.listModels('openai')
expect(models.find(model => model.id === 'gpt-4.1')).toEqual({
provider: 'openai', id: 'gpt-4.1', name: 'GPT-4.1',
inputModalities: ['text', 'image'], outputModalities: ['text'],
inputModalities: ['text', 'image'],
})
expect(models.every(model => model.provider === 'openai')).toBe(true)
const info = await ctx.llm.resolveModelInfo('openai', 'gpt-4.1')