Commit graph

87 commits

Author SHA1 Message Date
Dax Raad
b8e7d06356 sync 2025-06-10 22:18:27 -04:00
Dax Raad
bffc612a4e notice 2025-06-09 19:58:08 -04:00
Dax Raad
3b746162d2 run formatter 2025-05-31 14:41:00 -04:00
adamdottv
9d7c5efb9b
wip: refactoring tui 2025-05-28 15:36:36 -05:00
Ed Zynda
89e3a72ae1
feat: add support for piped input to CLI (#51) 2025-05-23 06:54:09 -05:00
Alvin Johansson
dff8e77eb6
docs: add clearer bedrock instructions (#40) 2025-05-20 08:23:51 -05:00
Ed Zynda
307982a099
feat: Add tool restriction flags for non-interactive mode (#29) 2025-05-17 08:23:13 -05:00
Ed Zynda
4a444e9c9b
feat: Make shell configurable via config file (#23) 2025-05-16 06:27:28 -05:00
Ed Zynda
623d132772
feat: Add non-interactive mode (#18) 2025-05-16 06:06:28 -05:00
mineo
87237b6462
feat: support VertexAI provider (#153)
* support: vertexai

fix

fix

set default for vertexai

added comment

fix

fix

* create schema

* fix README.md

* fix order

* added pupularity

* set tools if tools is exists

restore commentout

* fix comment

* set summarizer model
2025-05-15 13:35:06 -05:00
Ed Zynda
ab150be7c3
feat: Support named arguments in custom commands (#158)
* Allow multiple named args

* fix: Fix styling in multi-arguments dialog

* Remove old unused modal

* Focus on only one input at a time
2025-05-15 09:43:33 -05:00
adamdottv
658faab2bf
chore: update icon in readme 2025-05-15 07:03:58 -05:00
Dax Raad
182e32e4f7 add screenshot 2025-05-14 15:50:25 -04:00
adamdottv
4c998d4f4f
chore: remove sourcegraph tool 2025-05-14 10:42:16 -05:00
adamdottv
2391e338b4
chore: rename 2025-05-13 10:02:39 -05:00
adamdottv
36e5ae804e
chore: rename coder -> primary 2025-05-12 14:32:27 -05:00
Ed Zynda
1f8580553c
feat: custom commands (#133)
* Implement custom commands

* Add User: prefix

* Reuse var

* Check if the agent is busy and if so report a warning

* Update README

* fix typo

* Implement user and project scoped custom commands

* Allow for $ARGUMENTS

* UI tweaks

* Update internal/tui/components/dialog/arguments.go

Co-authored-by: Kujtim Hoxha <kujtimii.h@gmail.com>

* Also search in $HOME/.opencode/commands

---------

Co-authored-by: Kujtim Hoxha <kujtimii.h@gmail.com>
2025-05-12 09:58:59 -05:00
adamdottv
91ae9b33d3
feat: custom themes 2025-04-30 11:05:59 -05:00
Isaac Scarrott
98e2910e82
feat: Add support for OpenRouter (#92)
* Add support for OpenRouter as a new model provider

- Introduced `ProviderOpenRouter` in the `models` package.
- Added OpenRouter-specific models, including `GPT41`, `GPT41Mini`, `GPT4o`, and others, with their configurations and costs.
- Updated `generateSchema` to include OpenRouter as a provider.
- Added OpenRouter-specific environment variable handling (`OPENROUTER_API_KEY`) in `config.go`.
- Implemented default model settings for OpenRouter agents in `setDefaultModelForAgent`.
- Updated `getProviderAPIKey` to retrieve the OpenRouter API key.
- Extended `SupportedModels` to include OpenRouter models.
- Added OpenRouter client initialization in the `provider` package.
- Modified `processGeneration` to handle `FinishReasonUnknown` in addition to `FinishReasonToolUse`.

* [feature/openrouter-provider] Add new models and provider to schema

- Added "deepseek-chat-free" and "deepseek-r1-free" to the list of supported models in `opencode-schema.json`.

* [feature/openrouter-provider] Add OpenRouter provider support and integrate new models

- Updated README.md to include OpenRouter as a supported provider and its configuration details.
- Added `OPENROUTER_API_KEY` to environment variable configuration.
- Introduced OpenRouter-specific models in `internal/llm/models/openrouter.go` with mappings to existing cost and token configurations.
- Updated `internal/config/config.go` to set default models for OpenRouter agents.
- Extended `opencode-schema.json` to include OpenRouter models in the schema definitions.
- Refactored model IDs and names to align with OpenRouter naming conventions.

* [feature/openrouter-provider] Refactor finish reason handling and tool call logic in agent and OpenAI provider

- Simplified finish reason check in `agent.go` by removing redundant variable assignment.
- Updated `openai.go` to override the finish reason to `FinishReasonToolUse` when tool calls are present.
- Ensured consistent finish reason handling in both `send` and `stream` methods of the OpenAI provider.

[feature/openrouter-provider] Refactor finish reason handling and tool call logic in agent and OpenAI provider

- Simplified finish reason check in `agent.go` by removing redundant variable assignment.
- Updated `openai.go` to override the finish reason to `FinishReasonToolUse` when tool calls are present.
- Ensured consistent finish reason handling in both `send` and `stream` methods of the OpenAI provider.

* **[feature/openrouter-provider] Add support for custom headers in OpenAI client configuration**

- Introduced a new `extraHeaders` field in the `openaiOptions` struct to allow specifying additional HTTP headers.
- Added logic in `newOpenAIClient` to apply `extraHeaders` to the OpenAI client configuration.
- Implemented a new option function `WithOpenAIExtraHeaders` to set custom headers in `openaiOptions`.
- Updated the OpenRouter provider configuration in `NewProvider` to include default headers (`HTTP-Referer` and `X-Title`) for OpenRouter API requests.

* Update OpenRouter model config and remove unsupported models

* [feature/openrouter-provider] Update OpenRouter models and default configurations

- Added new OpenRouter models: `claude-3.5-sonnet`, `claude-3-haiku`, `claude-3.7-sonnet`, `claude-3.5-haiku`, and `claude-3-opus` in `openrouter.go`.
- Updated default agent models in `config.go`:
  - `agents.coder.model` now uses `claude-3.7-sonnet`.
  - `agents.task.model` now uses `claude-3.7-sonnet`.
  - `agents.title.model` now uses `claude-3.5-haiku`.
- Updated `opencode-schema.json` to include the new models in the allowed list for schema validation.
- Adjusted logic in `setDefaultModelForAgent` to reflect the new default models.

* [feature/openrouter-provider] Remove unused ProviderEvent emission in stream function

The changes remove the emission of a `ProviderEvent` with type `EventContentStop` in the `stream` function of the `openaiClient` implementation. This event was sent upon successful stream completion but is no longer used.
2025-04-29 13:56:49 +02:00
Aiden Cline
b3c0285db3
feat: model selection for given provider (#57)
* feat: model selection for given provider

* tweak: adjust cfg validation func, remove duplicated logic, consolidate agent updating into agent.go

* tweak: make the model dialog scrollable, adjust padding slightly for modal"

* feat: add provider selection, add hints, simplify some logic, add horizontal scrolling support, additional scroll indicators"

* remove nav help

* update docs

* increase number of visible models, make horizontal scroll "wrap"

* add provider popularity rankings
2025-04-28 19:25:06 +02:00
YJG
805aeff83c
feat: add azure openai models (#74) 2025-04-28 15:42:57 +02:00
Hunter Casten
7a62ab7675 feat(groq): add support for Groq using the OpenAI provider 2025-04-25 11:11:52 +02:00
Dax Raad
d043526200 add more installation options 2025-04-24 16:34:57 -04:00
Kujtim Hoxha
b106787a50 change package name 2025-04-24 18:26:16 +02:00
Kujtim Hoxha
2c5003e3fc remove edit/normal mode 2025-04-24 16:40:36 +02:00
Kujtim Hoxha
3a6a26981a init command 2025-04-21 19:53:55 +02:00
Kujtim Hoxha
d03a73a8d3 update readme 2025-04-21 16:22:52 +02:00
Kujtim Hoxha
e7bb99baab fix the memory bug 2025-04-21 13:42:29 +02:00
Kujtim Hoxha
333ea6ec4b implement patch, update ui, improve rendering 2025-04-21 13:42:27 +02:00
Kujtim Hoxha
bbfa60c787 reimplement agent,provider and add file history 2025-04-21 13:42:00 +02:00
Kujtim Hoxha
cdc5f209dc cleanup diff, cleanup agent 2025-04-21 13:41:27 +02:00
Kujtim Hoxha
bd2ec29b65 add initial git support 2025-04-21 13:38:42 +02:00
Kujtim Hoxha
5acf0cba60 update readme 2025-04-07 15:37:47 +02:00
Kujtim Hoxha
49b593d9dd small fixes 2025-04-03 19:50:31 +02:00
Kujtim Hoxha
cfdd687216 add initial lsp support 2025-04-03 17:23:41 +02:00
Kujtim Hoxha
afd9ad0560 rework llm 2025-04-01 13:38:54 +02:00
Kujtim Hoxha
904061c243 additional tools 2025-03-26 01:12:30 +01:00