opencoder icon indicating copy to clipboard operation
opencoder copied to clipboard

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

Open 1000i100 opened this issue 8 months ago โ€ข 3 comments

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 ?

1000i100 avatar May 03 '25 05:05 1000i100

@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 ๐Ÿ™‡

ducan-ne avatar May 06 '25 20:05 ducan-ne

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 [email protected]                           โ”‚
โ”‚   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.

1000i100 avatar May 08 '25 01:05 1000i100

@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

ducan-ne avatar May 08 '25 04:05 ducan-ne