feat(image): apply generation settings live
This commit is contained in:
1 parent
c7393c785e
commit
1616fa9f14
11 files changed
+481
-18
No files matched your search
@@ -703,6 +703,7 @@ def _validate_configured_provider(config: Any, provider: str) -> None:
|
||||
def _image_generation_provider_rows(config: Any) -> list[dict[str, Any]]:
|
||||
rows: list[dict[str, Any]] = []
|
||||
for name in image_gen_provider_names():
|
||||
image_provider = get_image_gen_provider(name)
|
||||
spec = find_by_name(name)
|
||||
provider_config = getattr(config.providers, name, None)
|
||||
configured = (
|
||||
@@ -723,6 +724,12 @@ def _image_generation_provider_rows(config: Any) -> list[dict[str, Any]]:
|
||||
"default_api_base": (
|
||||
spec.default_api_base if spec and spec.default_api_base else None
|
||||
),
|
||||
"models": list(image_provider.model_options) if image_provider else [],
|
||||
"default_model": (
|
||||
image_provider.model_options[0]
|
||||
if image_provider and image_provider.model_options
|
||||
else None
|
||||
),
|
||||
}
|
||||
)
|
||||
return rows
|
||||
|
||||
Reference in new issue
Block a user