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
64177c2d
Commit
64177c2d
authored
May 06, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: tighten multimodal client config defaults
parent
1b3cbb36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
test_manual_multimodal_test_client.py
tests/test_manual_multimodal_test_client.py
+27
-2
manual_multimodal_test_client.py
tools/manual_multimodal_test_client.py
+2
-2
No files found.
tests/test_manual_multimodal_test_client.py
View file @
64177c2d
...
@@ -48,15 +48,39 @@ def test_resolve_mode_config_uses_mode_defaults_when_overrides_absent(tmp_path):
...
@@ -48,15 +48,39 @@ def test_resolve_mode_config_uses_mode_defaults_when_overrides_absent(tmp_path):
assert
config
[
"url"
]
==
"http://127.0.0.1:6745"
assert
config
[
"url"
]
==
"http://127.0.0.1:6745"
assert
config
[
"model"
]
==
MODE_DEFAULTS
[
"audio-generation"
][
"model"
]
assert
config
[
"model"
]
==
MODE_DEFAULTS
[
"audio-generation"
][
"model"
]
assert
config
[
"prompt"
]
==
MODE_DEFAULTS
[
"audio-generation"
][
"prompt"
]
assert
config
[
"prompt"
]
==
MODE_DEFAULTS
[
"audio-generation"
][
"prompt"
]
assert
config
[
"response_format"
]
==
MODE_DEFAULTS
[
"audio-generation"
][
"response_format"
]
assert
config
[
"output_dir"
]
==
tmp_path
assert
config
[
"output_dir"
]
==
tmp_path
assert
"file"
not
in
config
def
test_resolve_mode_config_prefers_explicit_model_prompt_and_url_overrides
(
tmp_path
):
def
test_resolve_mode_config_normalizes_url_and_uses_default_input_files
(
tmp_path
):
args
=
parse_args
([
"transcription"
,
"--url"
,
"http://127.0.0.1:6745/"
,
"--output-dir"
,
str
(
tmp_path
),
])
config
=
resolve_mode_config
(
args
,
selected_mode
=
"transcription"
)
assert
config
[
"url"
]
==
"http://127.0.0.1:6745"
assert
config
[
"audio_file"
]
==
MODE_DEFAULTS
[
"transcription"
][
"audio_file"
]
def
test_resolve_mode_config_uses_default_video_file_for_video_doubt
(
tmp_path
):
args
=
parse_args
([
"video-doubt"
,
"--output-dir"
,
str
(
tmp_path
)])
config
=
resolve_mode_config
(
args
,
selected_mode
=
"video-doubt"
)
assert
config
[
"video_file"
]
==
MODE_DEFAULTS
[
"video-doubt"
][
"video_file"
]
def
test_resolve_mode_config_prefers_explicit_model_prompt_url_and_response_format_overrides
(
tmp_path
):
args
=
parse_args
([
args
=
parse_args
([
"video-generation"
,
"video-generation"
,
"--url"
,
"http://example.invalid:9999"
,
"--url"
,
"http://example.invalid:9999
/
"
,
"--model"
,
"video:custom-model"
,
"--model"
,
"video:custom-model"
,
"--prompt"
,
"Custom prompt"
,
"--prompt"
,
"Custom prompt"
,
"--response-format"
,
"b64_json"
,
"--output-dir"
,
str
(
tmp_path
),
"--output-dir"
,
str
(
tmp_path
),
])
])
...
@@ -65,4 +89,5 @@ def test_resolve_mode_config_prefers_explicit_model_prompt_and_url_overrides(tmp
...
@@ -65,4 +89,5 @@ def test_resolve_mode_config_prefers_explicit_model_prompt_and_url_overrides(tmp
assert
config
[
"url"
]
==
"http://example.invalid:9999"
assert
config
[
"url"
]
==
"http://example.invalid:9999"
assert
config
[
"model"
]
==
"video:custom-model"
assert
config
[
"model"
]
==
"video:custom-model"
assert
config
[
"prompt"
]
==
"Custom prompt"
assert
config
[
"prompt"
]
==
"Custom prompt"
assert
config
[
"response_format"
]
==
"b64_json"
assert
config
[
"output_dir"
]
==
tmp_path
assert
config
[
"output_dir"
]
==
tmp_path
tools/manual_multimodal_test_client.py
View file @
64177c2d
...
@@ -54,6 +54,7 @@ def build_parser() -> argparse.ArgumentParser:
...
@@ -54,6 +54,7 @@ def build_parser() -> argparse.ArgumentParser:
parser
.
add_argument
(
"--token"
,
default
=
None
)
parser
.
add_argument
(
"--token"
,
default
=
None
)
parser
.
add_argument
(
"--model"
,
default
=
None
)
parser
.
add_argument
(
"--model"
,
default
=
None
)
parser
.
add_argument
(
"--prompt"
,
default
=
None
)
parser
.
add_argument
(
"--prompt"
,
default
=
None
)
parser
.
add_argument
(
"--response-format"
,
default
=
None
)
parser
.
add_argument
(
"--output-dir"
,
default
=
"tmp/manual-client-output"
)
parser
.
add_argument
(
"--output-dir"
,
default
=
"tmp/manual-client-output"
)
parser
.
add_argument
(
"--file"
,
default
=
None
)
parser
.
add_argument
(
"--file"
,
default
=
None
)
parser
.
add_argument
(
"--audio-file"
,
default
=
None
)
parser
.
add_argument
(
"--audio-file"
,
default
=
None
)
...
@@ -74,10 +75,9 @@ def resolve_mode_config(args: argparse.Namespace, selected_mode: str) -> dict:
...
@@ -74,10 +75,9 @@ def resolve_mode_config(args: argparse.Namespace, selected_mode: str) -> dict:
"model"
:
args
.
model
or
defaults
.
get
(
"model"
),
"model"
:
args
.
model
or
defaults
.
get
(
"model"
),
"prompt"
:
args
.
prompt
if
args
.
prompt
is
not
None
else
defaults
.
get
(
"prompt"
),
"prompt"
:
args
.
prompt
if
args
.
prompt
is
not
None
else
defaults
.
get
(
"prompt"
),
"output_dir"
:
Path
(
args
.
output_dir
),
"output_dir"
:
Path
(
args
.
output_dir
),
"file"
:
args
.
file
,
"audio_file"
:
args
.
audio_file
or
defaults
.
get
(
"audio_file"
),
"audio_file"
:
args
.
audio_file
or
defaults
.
get
(
"audio_file"
),
"video_file"
:
args
.
video_file
or
defaults
.
get
(
"video_file"
),
"video_file"
:
args
.
video_file
or
defaults
.
get
(
"video_file"
),
"response_format"
:
defaults
.
get
(
"response_format"
),
"response_format"
:
args
.
response_format
or
defaults
.
get
(
"response_format"
),
}
}
...
...
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