Validate providers and retain complete run debugging context
This commit is contained in:
@@ -45,6 +45,9 @@ func (c OpenCodeClient) Interrupt(ctx context.Context, id string) error {
|
||||
}
|
||||
|
||||
func (c *AgentClient) Generate(ctx context.Context, config ModelConfig, prompt string) (text string, err error) {
|
||||
if c.Operations != nil {
|
||||
c.Operations.Provider, c.Operations.Model = config.Provider, config.Model
|
||||
}
|
||||
if c.command == nil {
|
||||
connection, err := opencode.Open(ctx, opencode.Executable(), c.Directory, c.Backend)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user