Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProviderKey is the provider key used in .opencode.json for yokai endpoints. ProviderKey = "yokai" // ModelPrefix is the prefix for local model references in OpenCode. ModelPrefix = "local." )
Variables ¶
This section is empty.
Functions ¶
func AddEndpoints ¶
AddEndpoints reads the OpenCode config and adds yokai model endpoints. It sets LOCAL_ENDPOINT to the first endpoint's base URL and configures the coder agent model. Creates a backup before modifying.
func AddEndpointsToFile ¶
AddEndpointsToFile adds yokai endpoints to a specific config file path.
func DetectConfigPath ¶
DetectConfigPath finds the OpenCode .opencode.json config path. Checks in order: $XDG_CONFIG_HOME/opencode/.opencode.json, ~/.opencode.json Returns the user-level config path (does not check project-local .opencode.json).
func HasYokaiEndpoints ¶
HasYokaiEndpoints checks if the config file has yokai endpoints configured.
func RemoveEndpoints ¶
RemoveEndpoints removes all yokai-added configuration from the OpenCode config.
Types ¶
Click to show internal directories.
Click to hide internal directories.