Skip to content

[Bug]: Ollama provider error: Invalid URL (version 3.2.2) #416

Open
@roeniss

Description

Opencommit Version

3.2.2

Node Version

20.11.1

NPM Version

10.8.3

What OS are you seeing the problem on?

Mac

What happened?

❯❯❯ oco
┌  open-commit
│
◇  1 staged files:
  src/main/kotlin/[REDACTED].kt
│
◇  ✖ Failed to generate the commit message
Error: Ollama provider error: Invalid URL
    at OllamaEngine.generateCommitMessage (/Users/roeniss/.nvm/versions/node/v20.11.1/lib/node_modules/opencommit/out/cli.cjs:40212:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async generateCommitMessageByDiff (/Users/roeniss/.nvm/versions/node/v20.11.1/lib/node_modules/opencommit/out/cli.cjs:45082:27)
    at async generateCommitMessageFromGitDiff (/Users/roeniss/.nvm/versions/node/v20.11.1/lib/node_modules/opencommit/out/cli.cjs:45293:25)
    at async trytm (/Users/roeniss/.nvm/versions/node/v20.11.1/lib/node_modules/opencommit/out/cli.cjs:45261:18)
    at async commit (/Users/roeniss/.nvm/versions/node/v20.11.1/lib/node_modules/opencommit/out/cli.cjs:45458:35)
│
└  ✖ Ollama provider error: Invalid URL
❯❯❯ oco --version
3.2.2
❯❯❯ cat ~/.opencommit
OCO_AI_PROVIDER=ollama
OCO_MODEL=llama3:latest
OCO_API_URL=undefined
OCO_API_KEY=undefined
OCO_TOKENS_MAX_INPUT=40960
OCO_TOKENS_MAX_OUTPUT=4096
OCO_DESCRIPTION=false
OCO_EMOJI=false
OCO_LANGUAGE=en
OCO_MESSAGE_TEMPLATE_PLACEHOLDER=$msg
OCO_PROMPT_MODULE=conventional-commit
OCO_ONE_LINE_COMMIT=false
OCO_TEST_MOCK_TYPE=commit-message
OCO_GITPUSH=true
OCO_WHY=false
❯❯❯ cat ~/.opencommit_migrations
[
  "00_use_single_api_key_and_url",
  "01_remove_obsolete_config_keys_from_global_file",
  "02_set_missing_default_values"
]%

Expected Behavior

.

Current Behavior

.

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions