Skip to content

Unable to set .env or any config from git-bash on windows #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1000i100 opened this issue May 3, 2025 · 3 comments
Open

Unable to set .env or any config from git-bash on windows #5

1000i100 opened this issue May 3, 2025 · 3 comments

Comments

@1000i100
Copy link

1000i100 commented May 3, 2025

Hi, i've just discover opencoder and the concept look great !

I try to use it with an ollama local model and i found no way to let it use my config.

Here is my coder.config.jsx in the project directory. If i rename it in .env it don't change anything.

import { ollama } from 'ollama-ai-provider'; // read more: https://sdk.vercel.ai/providers/community-providers/ollama
import type { Config } from 'opencoder';
import { webSearch } from "opencoder/mcp"


export default {
  model: ollama('gemma3:1b'),
  mcp: [webSearch()]
} satisfies Config

when i run : bunx opencoder@latest (or bun ai because i've add a script opencoder in package.json and the included dependencies)
I still have Model: claude-3-5-sonnet-20241022
But i shoud have gemma3:1b isn't it ?

@ducan-ne
Copy link
Owner

ducan-ne commented May 6, 2025

@1000i100, can you try with @next? I've published a fix for this a week ago, but it comes with another change in @next. My bad here 🙇

@1000i100
Copy link
Author

1000i100 commented May 8, 2025

I've just try with the same config in the .env, or in coder.config.jsx in current directory and running bunx opencoder@next and i still have :

(node:39485) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
╭────────────────────────────────────────────────────────────────╮
│                                                                │
│   Welcome to OpenCoder@0.1.0-next.20                           │
│   Model: claude-3-5-sonnet-20241022                            │
│   Working directory: /home/1000i100/gitWorkspace/check-match   │
│                                                                │
╰────────────────────────────────────────────────────────────────╯

╭──────────────────────────────────────────────────────────────────────────────╮
│ >                                                                            │
╰──────────────────────────────────────────────────────────────────────────────╯
  / for commands                                 alt + ⏎ for newline ·0 tokens

So it sticks to claude-3-5-sonnet-20241022 and don't switch to gemma3:1b like the config ask.

@ducan-ne
Copy link
Owner

ducan-ne commented May 8, 2025

@1000i100 I got why it happens, currently it not support for .jsx extension, can you try update to .js?

Image

here is working version from my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants