summaryrefslogtreecommitdiffhomepage
path: root/internal/llm
AgeCommit message (Collapse)Author
2025-05-01feat: lsp discoveryadamdottv
2025-04-29feat: Add support for OpenRouter (#92)Isaac Scarrott
* 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-28feat: model selection for given provider (#57)Aiden Cline
* 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-28feat: add azure openai models (#74)YJG
2025-04-27fix duplicate contextKujtim Hoxha
2025-04-27remove unnecessary varKujtim Hoxha
2025-04-27fix contextKujtim Hoxha
2025-04-27feat: configure context paths (#86)Garrett Ladley
2025-04-27fix minor issueKujtim Hoxha
2025-04-27fix gemini providerKujtim Hoxha
2025-04-27fix: gemini tool callingLukáš Loukota
2025-04-27small glob fixesKujtim Hoxha
2025-04-27[feature/ripgrep-glob] Add ripgrep-based file globbing to improve performanceisaac-scarrott
- Introduced `globWithRipgrep` function to perform file globbing using the `rg` (ripgrep) command. - Updated `globFiles` to prioritize ripgrep-based globbing and fall back to doublestar-based globbing if ripgrep fails. - Added logic to handle ripgrep command execution, output parsing, and filtering of hidden files. - Ensured results are sorted by path length and limited to the specified maximum number of matches. - Modified imports to include `os/exec` and `bytes` for ripgrep integration.
2025-04-27Handle new Cursor rules formatSam Ottenhoff
1. Check if a path ends with a slash (/) 2. If it does, treat it as a directory and read all files within it 3. For directories like .cursor/rules/, it will scan all files and include their content in the prompt 4. Each file from a directory will be prefixed with "# From filename" for clarity
2025-04-27fix retry warningKujtim Hoxha
2025-04-27use workingDir if shellInstance is nil otherwise use cwd if shellInstance is ↵Fuad
not nil
2025-04-27use provided workingg dirFuad
2025-04-27Fix nil pointer dereference in GetPersistentShellFuad
Added nil check in GetPersistentShell before accessing shellInstance.isAlive to prevent panic when newPersistentShell returns nil due to shell startup errors. This resolves the "invalid memory address or nil pointer dereference" error that was occurring in the shell tool.
2025-04-25fix acc errorKujtim Hoxha
2025-04-25small fixesKujtim Hoxha
2025-04-25feat(groq): add support for Groq using the OpenAI providerHunter Casten
2025-04-24change package nameKujtim Hoxha
2025-04-21init commandKujtim Hoxha
2025-04-21config validationKujtim Hoxha
2025-04-21remove old logsKujtim Hoxha
2025-04-21fix anthropicKujtim Hoxha
2025-04-21add context to the promptKujtim Hoxha
2025-04-21improve cacheKujtim Hoxha
2025-04-21initial tool call streamKujtim Hoxha
2025-04-21lsp improvementsKujtim Hoxha
2025-04-21add bedrock modelKujtim Hoxha
2025-04-21small fixesKujtim Hoxha
2025-04-21implement patch, update ui, improve renderingKujtim Hoxha
2025-04-21small fixesKujtim Hoxha
2025-04-21Update agent prompt, improve TUI patch UI, remove obsolete tool testsKujtim Hoxha
- Replace and expand agent coder prompt for clarity and safety - Add patch tool and TUI dialog support for patch diffs - Sort sidebar modified files by name - Remove Bash/Edit/Sourcegraph/Write tool tests 🤖 Generated with opencode Co-Authored-By: opencode <[email protected]>
2025-04-21rename to opencodeKujtim Hoxha
2025-04-21reimplement agent,provider and add file historyKujtim Hoxha
2025-04-21minor fixesKujtim Hoxha
2025-04-21fix diffKujtim Hoxha
2025-04-21remove node dependency and implement diff formatKujtim Hoxha
2025-04-21handle errors correctly in the other toolsKujtim Hoxha
2025-04-21handle errors correctly in the edit toolKujtim Hoxha
2025-04-21handle errros correctly in the bash toolKujtim Hoxha
2025-04-21handle errors correctly in the agent toolKujtim Hoxha
2025-04-21cleanup diff, cleanup agentKujtim Hoxha
2025-04-21cleanup app, config and rootKujtim Hoxha
2025-04-21add initial git supportKujtim Hoxha
2025-04-21implement nested tool calls and initial setup for result metadataKujtim Hoxha
2025-04-15OpenAI model config changed to GPT-4.1jdlms
2025-04-11small changeKujtim Hoxha