Expose model capability hints and configurable vision projector placement

This commit is contained in:
Mikei386
2026-09-28 22:03:39 +02:00
parent a36a151c94
commit 06c6292cf3
10 changed files with 112 additions and 21 deletions
+8
View File
@@ -66,6 +66,14 @@ class EndpointTests(unittest.TestCase):
self.enable('image')
with self.assertRaises(ValueError):self.enable('badimage')
self.assertEqual(self.ep.config['enabled_profiles'],['image'])
def test_vision_needs_projector_and_rejects_remote_urls(self):
self.enable('alpha')
data=dict(model='alpha',messages=[{'role':'user','content':[{'type':'image_url','image_url':{'url':'https://example.com/a.png'}}]}])
self.assertEqual(self.request('/v1/chat/completions',data)[0],400)
self.rows[0]['parameters']['vision_projector']='synthetic'
self.assertEqual(self.request('/v1/chat/completions',data)[0],400)
data['messages'][0]['content'][0]['image_url']['url']='data:image/png;base64,aGVsbG8='
self.assertEqual(self.request('/v1/chat/completions',data)[0],200)
def test_profile_switch_and_sampling_defaults(self):
for name in ('alpha','beta'):self.enable(name)
for name in ('alpha','beta'):