Repro on MacOS Tahoe 26.2, ShellGPT 1.5.0, ollama version is 0.15.2
Might also be a config issue in which case we should update the readme.
ollama is up and running on `127.0.0.1:11434`
ollama has the llama3 model installed.
shell_gpt config file is shown in [1].
`sgpt --model ollama/llama3 "Who are you?"`
`NotFoundError: 404 page not found`
Stack-trace in [2].
[1]
"~/.config/shell_gpt/.sgptrc" 24L, 688B
CHAT_CACHE_PATH=/var/folders/fc/0gbpj9qn4q55z440_kc55nsm003cxr/T/chat_cache
CACHE_PATH=/var/folders/fc/0gbpj9qn4q55z440_kc55nsm003cxr/T/cache
CHAT_CACHE_LENGTH=100
CACHE_LENGTH=100
REQUEST_TIMEOUT=60
DEFAULT_MODEL=llama3
DEFAULT_COLOR=magenta
ROLE_STORAGE_PATH=/Users/jciesko/.config/shell_gpt/roles
DEFAULT_EXECUTE_SHELL_CMD=false
DISABLE_STREAMING=false
CODE_THEME=dracula
OPENAI_FUNCTIONS_PATH=/Users/jciesko/.config/shell_gpt/functions
OPENAI_USE_FUNCTIONS=false
SHOW_FUNCTIONS_OUTPUT=false
API_BASE_URL=default
PRETTIFY_MARKDOWN=true
USE_LITELLM=false
SHELL_INTERACTION=true
OS_NAME=auto
SHELL_NAME=auto
API_BASE_URL=http://127.0.0.1:11434
DEFAULT_MODEL=llama3
OPENAI_API_KEY=dummy
[2]
│ ╭───────────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────────╮ │
│ │ input_options = FinalRequestOptions( │ │
│ │ │ method='post', │ │
│ │ │ url='/chat/completions', │ │
│ │ │ params={}, │ │
│ │ │ headers=NOT_GIVEN, │ │
│ │ │ max_retries=NOT_GIVEN, │ │
│ │ │ timeout=NOT_GIVEN, │ │
│ │ │ files=None, │ │
│ │ │ idempotency_key='stainless-python-retry-8333c8d6-78c8-4772-ab62-14dfcb7413a3', │ │
│ │ │ post_parser=NOT_GIVEN, │ │
│ │ │ follow_redirects=None, │ │
│ │ │ content=None, │ │
│ │ │ json_data={ │ │
│ │ │ │ 'messages': [ │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'system', │ │
│ │ │ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system administration assistant.\nYou ar'+275 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ {'role': 'user', 'content': 'Who are you?'} │ │
│ │ │ │ ], │ │
│ │ │ │ 'model': 'ollama/gemma3', │ │
│ │ │ │ 'stream': True, │ │
│ │ │ │ 'temperature': 0.0, │ │
│ │ │ │ 'top_p': 1.0 │ │
│ │ │ }, │ │
│ │ │ extra_json=None │ │
│ │ ) │ │
│ │ kwargs = {} │ │
│ │ max_retries = 2 │ │
│ │ options = FinalRequestOptions( │ │
│ │ │ method='post', │ │
│ │ │ url='/chat/completions', │ │
│ │ │ params={}, │ │
│ │ │ headers=NOT_GIVEN, │ │
│ │ │ max_retries=NOT_GIVEN, │ │
│ │ │ timeout=NOT_GIVEN, │ │
│ │ │ files=None, │ │
│ │ │ idempotency_key='stainless-python-retry-8333c8d6-78c8-4772-ab62-14dfcb7413a3', │ │
│ │ │ post_parser=NOT_GIVEN, │ │
│ │ │ follow_redirects=None, │ │
│ │ │ content=None, │ │
│ │ │ json_data={ │ │
│ │ │ │ 'messages': [ │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'system', │ │
│ │ │ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system administration assistant.\nYou ar'+275 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ {'role': 'user', 'content': 'Who are you?'} │ │
│ │ │ │ ], │ │
│ │ │ │ 'model': 'ollama/gemma3', │ │
│ │ │ │ 'stream': True, │ │
│ │ │ │ 'temperature': 0.0, │ │
│ │ │ │ 'top_p': 1.0 │ │
│ │ │ }, │ │
│ │ │ extra_json=None │ │
│ │ ) │ │
│ │ remaining_retries = 2 │ │
│ │ request = <Request('POST', 'http://127.0.0.1:11434/chat/completions')> │ │
│ │ response = <Response [404 Not Found]> │ │
│ │ retries_taken = 0 │ │
│ │ self = <openai.OpenAI object at 0x10d195940> │ │
│ │ stream = True │ │
│ │ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChunk] │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Full stack-trace attached.
trace.txt
Repro on
MacOS Tahoe 26.2,ShellGPT 1.5.0,ollama version is 0.15.2Might also be a config issue in which case we should update the readme.
Stack-trace in [2].
[1]
[2]
│ ╭───────────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────────╮ │
│ │ input_options = FinalRequestOptions( │ │
│ │ │ method='post', │ │
│ │ │ url='/chat/completions', │ │
│ │ │ params={}, │ │
│ │ │ headers=NOT_GIVEN, │ │
│ │ │ max_retries=NOT_GIVEN, │ │
│ │ │ timeout=NOT_GIVEN, │ │
│ │ │ files=None, │ │
│ │ │ idempotency_key='stainless-python-retry-8333c8d6-78c8-4772-ab62-14dfcb7413a3', │ │
│ │ │ post_parser=NOT_GIVEN, │ │
│ │ │ follow_redirects=None, │ │
│ │ │ content=None, │ │
│ │ │ json_data={ │ │
│ │ │ │ 'messages': [ │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'system', │ │
│ │ │ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system administration assistant.\nYou ar'+275 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ {'role': 'user', 'content': 'Who are you?'} │ │
│ │ │ │ ], │ │
│ │ │ │ 'model': 'ollama/gemma3', │ │
│ │ │ │ 'stream': True, │ │
│ │ │ │ 'temperature': 0.0, │ │
│ │ │ │ 'top_p': 1.0 │ │
│ │ │ }, │ │
│ │ │ extra_json=None │ │
│ │ ) │ │
│ │ kwargs = {} │ │
│ │ max_retries = 2 │ │
│ │ options = FinalRequestOptions( │ │
│ │ │ method='post', │ │
│ │ │ url='/chat/completions', │ │
│ │ │ params={}, │ │
│ │ │ headers=NOT_GIVEN, │ │
│ │ │ max_retries=NOT_GIVEN, │ │
│ │ │ timeout=NOT_GIVEN, │ │
│ │ │ files=None, │ │
│ │ │ idempotency_key='stainless-python-retry-8333c8d6-78c8-4772-ab62-14dfcb7413a3', │ │
│ │ │ post_parser=NOT_GIVEN, │ │
│ │ │ follow_redirects=None, │ │
│ │ │ content=None, │ │
│ │ │ json_data={ │ │
│ │ │ │ 'messages': [ │ │
│ │ │ │ │ { │ │
│ │ │ │ │ │ 'role': 'system', │ │
│ │ │ │ │ │ 'content': 'You are ShellGPT\nYou are programming and system administration assistant.\nYou ar'+275 │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ {'role': 'user', 'content': 'Who are you?'} │ │
│ │ │ │ ], │ │
│ │ │ │ 'model': 'ollama/gemma3', │ │
│ │ │ │ 'stream': True, │ │
│ │ │ │ 'temperature': 0.0, │ │
│ │ │ │ 'top_p': 1.0 │ │
│ │ │ }, │ │
│ │ │ extra_json=None │ │
│ │ ) │ │
│ │ remaining_retries = 2 │ │
│ │ request = <Request('POST', 'http://127.0.0.1:11434/chat/completions')> │ │
│ │ response = <Response [404 Not Found]> │ │
│ │ retries_taken = 0 │ │
│ │ self = <openai.OpenAI object at 0x10d195940> │ │
│ │ stream = True │ │
│ │ stream_cls = openai.Stream[openai.types.chat.chat_completion_chunk.ChatCompletionChunk] │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Full stack-trace attached.
trace.txt