How to modify endpoint and API key for an existing OpenAI-compatible provider profile?Can't find endpoint URL and API key in config.toml for it
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Description
I added an OpenAI-compatible provider using jcode provider add command. Now I need to change the endpoint URL and API key, but I can't find these settings anywhere in ~/.jcode/config.toml.
What I've checked
-
I opened
~/.jcode/config.tomland looked for the provider configuration:cat ~/.jcode/config.toml -
The file only contains basic settings like:
[provider] default_provider = "my-api" [display] centered = trueBut there's no
[providers.my-api]section showing thebase_urlorapi_key. -
I also checked:
~/.config/jcode/*.env- no relevant files found~/.jcode/directory - onlyconfig.tomland sessions- The docs at https://jcode.sh/docs#providers - they mention config.toml but don't explain where the actual endpoint/key are stored
Questions
-
Where does jcode actually store the endpoint URL and API key for providers added via
jcode provider add? They don't appear to be inconfig.toml. -
How can I update the endpoint URL and API key for an existing provider profile if I can't find where they're stored?
-
Is there a command like
jcode provider listto show current configuration, orjcode provider editto modify it? -
If the credentials are stored elsewhere (like in a keychain, encrypted file, or separate auth file), how do I update them?
Steps to reproduce
# Add a provider
printf '%s' "$MY_API_KEY" | jcode provider add test-api \
--base-url https://test.example.com/v1 \
--model gpt-4
# Check config - endpoint and key are missing
cat ~/.jcode/config.toml
Expected behavior
I expected to find the endpoint URL and API key in ~/.jcode/config.toml under [providers.test-api], or have a clear way to update them through the CLI.
Environment
- OS: win11
- jcode version: 0.75.5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the jcode provider add command and the provider documentation at https://jcode.sh/docs#providers. Trace how the command handles --base-url, --model, and the piped API key, then compare that behavior with ~/.jcode/config.toml and ~/.config/jcode/*.env. Done means documenting where these values are stored and the supported way to view or update an existing provider.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 48/100