Project
cortex
Description
The help text shows cortex models [PROVIDER] [COMMAND], implying cortex models openai list should filter to OpenAI models. Instead, it returns the full unfiltered list (starting with Anthropic). The provider filter only works when the provider is placed after list.
Error Message
Debug Logs
System Information
- macOS 26.2 (25C56)
- cortex 0.1.1
Screenshots
No response
Steps to Reproduce
- Run the command in the order suggested by the usage string (provider first, command second), twice:
$ cortex models openai list --json | head -n 8; echo EXIT:$?
[
{
"id": "claude-sonnet-4-20250514",
"name": "Claude Sonnet 4",
"provider": "anthropic",
"capabilities": {
"vision": true,
"tools": true,
EXIT:0
$ cortex models openai list --json | head -n 8; echo EXIT:$?
[
{
"id": "claude-sonnet-4-20250514",
"name": "Claude Sonnet 4",
"provider": "anthropic",
"capabilities": {
"vision": true,
"tools": true,
EXIT:0
- Compare with provider after the
list command:
$ cortex models list openai --json | head -n 6
[
{
"id": "gpt-4o",
"name": "GPT-4o",
"provider": "openai",
"capabilities": {
Expected Behavior
cortex models openai list should filter to OpenAI models per the documented argument order.
Actual Behavior
The provider filter is ignored when the provider is placed before list, and the full model list is returned.
Additional Context
The current argument parsing only applies the provider filter when the provider appears after the list subcommand.
Project
cortex
Description
The help text shows
cortex models [PROVIDER] [COMMAND], implyingcortex models openai listshould filter to OpenAI models. Instead, it returns the full unfiltered list (starting with Anthropic). The provider filter only works when the provider is placed afterlist.Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
listcommand:Expected Behavior
cortex models openai listshould filter to OpenAI models per the documented argument order.Actual Behavior
The provider filter is ignored when the provider is placed before
list, and the full model list is returned.Additional Context
The current argument parsing only applies the provider filter when the provider appears after the
listsubcommand.