feat(image): complete reviewed generation delivery
Memind CI / Test, build, and release guards (pull_request) Successful in 2m47s
Memind CI / Test, build, and release guards (pull_request) Successful in 2m47s
This commit is contained in:
@@ -65,7 +65,7 @@ test('asset gateway stays disabled by default and never blocks callers that choo
|
||||
});
|
||||
});
|
||||
|
||||
test('each optional asset plugin can bind its own approved LLM model', async () => {
|
||||
test('asset plugins no longer bind per-plugin LLM models', async () => {
|
||||
const service = createAssetGatewayConfigService(createPool(), { llmProviderService });
|
||||
await service.updateGlobalConfig({ enabled: true }, { updatedBy: 'admin-1' });
|
||||
const result = await service.updatePluginConfig('asset-generate', {
|
||||
@@ -79,11 +79,12 @@ test('each optional asset plugin can bind its own approved LLM model', async ()
|
||||
const plugin = result.config.plugins.find((item) => item.pluginId === 'asset-generate');
|
||||
assert.equal(plugin.enabled, true);
|
||||
assert.equal(plugin.provider, 'flux-schnell');
|
||||
assert.equal(plugin.llmModel, 'fast-model');
|
||||
assert.equal(plugin.llmProviderKeyId, null);
|
||||
assert.equal(plugin.llmModel, null);
|
||||
assert.equal((await service.resolvePlugin('asset-generate')).ok, true);
|
||||
});
|
||||
|
||||
test('asset plugins reject unknown providers and unsupported LLM bindings', async () => {
|
||||
test('asset plugins reject unknown providers', async () => {
|
||||
const service = createAssetGatewayConfigService(createPool(), { llmProviderService });
|
||||
const invalidProvider = await service.updatePluginConfig('asset-generate', {
|
||||
enabled: true,
|
||||
@@ -92,14 +93,16 @@ test('asset plugins reject unknown providers and unsupported LLM bindings', asyn
|
||||
assert.equal(invalidProvider.ok, false);
|
||||
assert.match(invalidProvider.message, /Provider/);
|
||||
|
||||
const unsupportedLlm = await service.updatePluginConfig('asset-transform', {
|
||||
const transform = await service.updatePluginConfig('asset-transform', {
|
||||
enabled: true,
|
||||
provider: 'sharp',
|
||||
llmProviderKeyId: 'provider-key-1',
|
||||
llmModel: 'fast-model',
|
||||
});
|
||||
assert.equal(unsupportedLlm.ok, false);
|
||||
assert.match(unsupportedLlm.message, /不支持 LLM/);
|
||||
assert.equal(transform.ok, true);
|
||||
const plugin = transform.config.plugins.find((item) => item.pluginId === 'asset-transform');
|
||||
assert.equal(plugin.llmProviderKeyId, null);
|
||||
assert.equal(plugin.llmModel, null);
|
||||
});
|
||||
|
||||
test('image_make purposes are disabled by default and resolved independently', async () => {
|
||||
|
||||
Reference in New Issue
Block a user