Skip to content

Accepting local models ? #4

Closed
Closed

Description

It would be great to be able to connect to local models (with OpenAI API for instance ou Ollama API ?) ?

Activity

  1. 1jehuang commented on Feb 23, 2026

    @1jehuang
    Owner

    i'm not a fan of local models, but if enough people want it i will add it.

  2. pomazanbohdan commented on Mar 16, 2026

    @pomazanbohdan

    Some people may use an LLM proxy, in which case this will also be required.

  3. KeentGG commented on Apr 1, 2026

    @KeentGG

    how to add custom models? i have fireworks.ai firepass which is unlimited turbo version of kimi k2.5, but cant use it nor add as model in jcode

  4. 1jehuang commented on Apr 7, 2026

    @1jehuang
    Owner

    support for ollama api is here! Could you guys help me test this? /login and select ollama.

  5. 1jehuang commented on Apr 7, 2026

    @1jehuang
    Owner

    also general openai api comatibility is there

  6. julienlesbegueriesperso commented on Apr 7, 2026

    @julienlesbegueriesperso
    Author

    It failed :

    Enter 1-39: 36
    Setting up Ollama...
    See setup details: https://ollama.com/blog/openai-compatibility
    
    Endpoint: http://localhost:11434/v1
    This provider uses a local OpenAI-compatible endpoint.
    An API key is optional here. Press Enter to skip if your local server does not require one.
    
    Optional Ollama API key:
    
    Saved Ollama local endpoint setup.
    Stored at ~/.config/jcode/ollama.env
    
    Validating Ollama login with live auth/runtime checks...
    === auth-test: ollama ===
    credential paths:
      - /Users/jlesbegu/Library/Application Support/jcode/ollama.env
    ✓ credential_probe — Ollama auth status is available (local endpoint (`http://localhost:11434/v1`)).
    ✓ refresh_probe — Skipped: provider does not expose a dedicated refresh probe in jcode today.
    ✗ provider_smoke — ollama provider smoke prompt failed: API error (402 Payment Required): {"error":{"message":"This request requires more credits, or fewer max_tokens. You requested up to 64000 tokens, but can only afford 2666. To increase, visit https://openrouter.ai/settings/credits and upgrade to a paid account","code":402,"metadata":{"provider_name":null}},"user_id":"user_3AXXXXXXXXXXXXXXXXXXX"}
    result: FAIL
    
    Error: Post-login validation failed for Ollama. Credentials were saved, but jcode could not verify runtime readiness. Re-test with `jcode --provider ollama run "Reply with exactly AUTH_TEST_OK and nothing else."` after fixing the provider/runtime.

    My local Ollama has a context of 128K

  7. 1jehuang commented on Apr 15, 2026

    @1jehuang
    Owner

    Local models are supported now via Ollama and general OpenAI-compatible endpoints.

    I re-tested this on a real Ollama setup with a saved ~/.config/jcode/ollama.env and a local model (llama3.2:1b) on current master.

    Verified working:

    • jcode auth-test --provider ollama --no-tool-smoke
    • jcode --provider ollama --model llama3.2:1b run "Reply with exactly AUTH_TEST_OK and nothing else."

    Both passed.

    I also specifically re-checked the earlier failure report in this thread. On current master, I could not reproduce the old behavior where the Ollama validation path ended up hitting an OpenRouter 402 with the requested up to 64000 tokens message.

    Closing this as resolved.

    If anyone still hits a local-model issue, please open a new issue with:

    • provider
    • model
    • exact jcode auth-test --provider ... output
    • whether you are using Ollama or another OpenAI-compatible server
  8. 1jehuang commented on Apr 15, 2026

    @1jehuang
    Owner

    Closing as resolved. Please open a new issue if a specific local-model provider or model still fails on current master.

  9. nicolasmn commented on May 4, 2026

    @nicolasmn

    @1jehuang The described steps work but starting a new session using jcode --provider ollama --model llama3.2:1b doesn't work. The provider always shows as "OpenRouter" and the /model command dosen't show any of my locally installed models.

  10. alexewsv commented on May 7, 2026

    @alexewsv

    Hello,
    It works with base_url is http://localhost:11434/v1 but it ollama running on another machine in the LAN it complain when set base_url is http://<LAN_IP>:11434/v1 it suggest to use a weird format http://localhost/127.0.0.1/<LAN_IP>:11434/v1 I also tried set as suggested but got error

    === auth-test: openai-compatible ===
    credential paths:
      - /Users/anb/Library/Application Support/jcode/openai-compatible.env
    ✓ credential_probe — OpenAI-compatible auth status is available (API key (`OPENAI_COMPAT_API_KEY`)).
    ✓ refresh_probe — Skipped: provider does not expose a dedicated refresh probe in jcode today.
    ✗ provider_smoke — openai-compatible provider smoke prompt failed: Failed to send OpenAI-compatible chat request
      endpoint: http://localhost/127.0.0.1/192.168.1.25:11434/v1/chat/completions
      model: FPT.AI-KIE-v1.7
      auth: local endpoint (no auth)
    Hint: check network connectivity, DNS/TLS, and that the base URL includes the API version (usually /v1).: error sending request for url (http://localhost/127.0.0.1/192.168.1.25:11434/v1/chat/completions): client error (Connect): tcp connect error: Connection refused (os error 61)
    result: FAIL
    
    Error: One or more auth tests failed
    

    Thanks,

  11. 5 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions