Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
30f105dc
Commit
30f105dc
authored
May 06, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: clarify multimodal doubt fallback behavior
parent
8497d29a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
test_manual_multimodal_test_client.py
tests/test_manual_multimodal_test_client.py
+40
-0
manual_multimodal_test_client.py
tools/manual_multimodal_test_client.py
+4
-2
No files found.
tests/test_manual_multimodal_test_client.py
View file @
30f105dc
...
@@ -255,6 +255,9 @@ def test_build_request_spec_for_video_doubt_request_builder_uses_text_endpoint_w
...
@@ -255,6 +255,9 @@ def test_build_request_spec_for_video_doubt_request_builder_uses_text_endpoint_w
assert
spec
[
"json"
][
"model"
]
==
"vision:test"
assert
spec
[
"json"
][
"model"
]
==
"vision:test"
assert
str
(
video_path
)
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
str
(
video_path
)
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"What happens in this clip?"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"What happens in this clip?"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"local path reference only"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"may or may not support reasoning from that reference"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"acknowledge that limitation"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
def
test_build_request_spec_for_music_audio_doubt_request_builder_uses_text_endpoint_with_audio_context
(
tmp_path
):
def
test_build_request_spec_for_music_audio_doubt_request_builder_uses_text_endpoint_with_audio_context
(
tmp_path
):
...
@@ -278,6 +281,43 @@ def test_build_request_spec_for_music_audio_doubt_request_builder_uses_text_endp
...
@@ -278,6 +281,43 @@ def test_build_request_spec_for_music_audio_doubt_request_builder_uses_text_endp
assert
spec
[
"json"
][
"model"
]
==
"audio:test"
assert
spec
[
"json"
][
"model"
]
==
"audio:test"
assert
str
(
audio_path
)
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
str
(
audio_path
)
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"Describe the music."
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"Describe the music."
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"local path reference only"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"may or may not support reasoning from that reference"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
assert
"acknowledge that limitation"
in
spec
[
"json"
][
"messages"
][
0
][
"content"
]
def
test_build_request_spec_for_video_doubt_request_builder_requires_video_file_flag
(
tmp_path
):
config
=
{
"mode"
:
"video-doubt"
,
"url"
:
"http://127.0.0.1:6745"
,
"model"
:
"vision:test"
,
"prompt"
:
"What happens in this clip?"
,
"output_dir"
:
tmp_path
,
"token"
:
None
,
"audio_file"
:
None
,
"video_file"
:
None
,
"response_format"
:
None
,
}
with
pytest
.
raises
(
FileNotFoundError
,
match
=
r"Missing required file\. Supply --video-file\."
):
build_request_spec
(
config
)
def
test_build_request_spec_for_music_audio_doubt_request_builder_requires_audio_file_flag
(
tmp_path
):
config
=
{
"mode"
:
"music-audio-doubt"
,
"url"
:
"http://127.0.0.1:6745"
,
"model"
:
"audio:test"
,
"prompt"
:
"Describe the music."
,
"output_dir"
:
tmp_path
,
"token"
:
None
,
"audio_file"
:
None
,
"video_file"
:
None
,
"response_format"
:
None
,
}
with
pytest
.
raises
(
FileNotFoundError
,
match
=
r"Missing required file\. Supply --audio-file\."
):
build_request_spec
(
config
)
def
test_build_request_spec_for_transcription_requires_audio_file_flag
(
tmp_path
):
def
test_build_request_spec_for_transcription_requires_audio_file_flag
(
tmp_path
):
...
...
tools/manual_multimodal_test_client.py
View file @
30f105dc
...
@@ -150,7 +150,8 @@ def build_request_spec(config: dict) -> dict:
...
@@ -150,7 +150,8 @@ def build_request_spec(config: dict) -> dict:
content
=
(
content
=
(
f
"Video file: {video_path}
\n
"
f
"Video file: {video_path}
\n
"
f
"Question: {config['prompt']}
\n
"
f
"Question: {config['prompt']}
\n
"
"Answer based on the referenced video input if the model/backend supports it."
"This request provides a local path reference only; the backend/model may or may not support reasoning from that reference. "
"If you cannot access the referenced media, acknowledge that limitation in your answer."
)
)
return
{
return
{
"method"
:
"POST"
,
"method"
:
"POST"
,
...
@@ -167,7 +168,8 @@ def build_request_spec(config: dict) -> dict:
...
@@ -167,7 +168,8 @@ def build_request_spec(config: dict) -> dict:
content
=
(
content
=
(
f
"Audio file: {audio_path}
\n
"
f
"Audio file: {audio_path}
\n
"
f
"Question: {config['prompt']}
\n
"
f
"Question: {config['prompt']}
\n
"
"Answer based on the referenced audio input if the model/backend supports it."
"This request provides a local path reference only; the backend/model may or may not support reasoning from that reference. "
"If you cannot access the referenced media, acknowledge that limitation in your answer."
)
)
return
{
return
{
"method"
:
"POST"
,
"method"
:
"POST"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment