Skip to content

Commit e51b16a

Browse files
committed
fix: avoid setting up embeddings on RITS
resolves #1578 Signed-off-by: Jan Pokorný <[email protected]>
1 parent ffec39d commit e51b16a

File tree

1 file changed

+13
-1
lines changed
  • apps/agentstack-cli/src/agentstack_cli/commands

1 file changed

+13
-1
lines changed

apps/agentstack-cli/src/agentstack_cli/commands/model.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,26 @@ async def setup(
439439
default_llm_model = await _select_default_model(ModelCapability.LLM)
440440

441441
default_embedding_model = None
442-
if ModelCapability.EMBEDDING in llm_provider.capabilities:
442+
if (
443+
ModelCapability.EMBEDDING in llm_provider.capabilities
444+
and llm_provider.type
445+
!= ModelProviderType.RITS # RITS does not support embeddings, but we treat it as OTHER
446+
and (
447+
llm_provider.type != ModelProviderType.OTHER # OTHER may not support embeddings, so we ask
448+
or inquirer.confirm( # type: ignore
449+
"Do you want to also set up an embedding model from the same provider?", default=True
450+
)
451+
)
452+
):
443453
default_embedding_model = await _select_default_model(ModelCapability.EMBEDDING)
444454
elif await inquirer.confirm( # type: ignore
445455
message="Do you want to configure an embedding provider? (recommended)", default=True
446456
).execute_async():
447457
console.print("[bold]Setting up embedding provider...[/bold]")
448458
await _add_provider(capability=ModelCapability.EMBEDDING, use_true_localhost=use_true_localhost)
449459
default_embedding_model = await _select_default_model(ModelCapability.EMBEDDING)
460+
else:
461+
console.hint("You can add an embedding provider later with: [green]agentstack model add[/green]")
450462

451463
with console.status("Saving configuration...", spinner="dots"):
452464
await SystemConfiguration.update(

0 commit comments

Comments
 (0)