You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUG] [v0.0.7] cortex agent show --model <bad> accepts any string without validation — inconsistent with cortex agent generate --model` which validates and bails #48570
run_show includes the --model override in JSON/text output without calling validate_model_name. run_generate calls validate_model_name(model_arg)? and bails on invalid formats. A user running cortex agent show my-agent --model 'not/a/model' receives output with the invalid model name embedded, giving the impression the override is valid. The same string would cause an immediate error in agent generate.
Error Message
None for`agent show`;for`agent generate`: `Error: invalid model name 'not/a/model'`.
Symbols: run_show — model_override.clone() inserted directly with no validation; compare generate.rs L69-L76 which calls validate_model_name(model_arg)?
Project
cortex
Description
run_showincludes the--modeloverride in JSON/text output without callingvalidate_model_name.run_generatecallsvalidate_model_name(model_arg)?and bails on invalid formats. A user runningcortex agent show my-agent --model 'not/a/model'receives output with the invalid model name embedded, giving the impression the override is valid. The same string would cause an immediate error inagent generate.Error Message
Debug Logs
System Information
- OS: Windows 11 - Cortex version: `cortex 0.0.7 (7954d02 2026-03-30)`Screenshots
20260406_094346_50_8.mp4
Steps to Reproduce
cortex agent show my-agent --model 'totally@invalid!'.Model: totally@invalid! (override via --model)— no error.cortex agent generate "test" --model 'totally@invalid!'— fails with validation error.Expected Behavior
agent show --modelshould validate the model name format the same wayagent generate --modeldoes.Actual Behavior
agent show --modelshould validate the model name format the same wayagent generate --modeldoes.Additional Context
Code Evidence
src/cortex-cli/src/agent_cmd/handlers/show.rssrc/cortex-cli/src/agent_cmd/handlers/show.rs#L37-L43run_show—model_override.clone()inserted directly with no validation; comparegenerate.rsL69-L76 which callsvalidate_model_name(model_arg)?