feat(stage): honor per-stage reasoning effort across native harnesses
This commit is contained in:
@@ -309,13 +309,20 @@ func (c *OpenCodeClient) Generate(ctx context.Context, config ModelConfig, promp
|
||||
if len(encoded) > maxModelRequest {
|
||||
return "", fmt.Errorf("OpenCode request exceeds 64 KiB limit")
|
||||
}
|
||||
model, err := openCodeModelSelection(config, c.Backend)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
created, err := c.call(ctx, "post", "/api/session", map[string]any{
|
||||
"title": "Pipeline stage generation",
|
||||
"location": map[string]string{"directory": directory},
|
||||
"model": map[string]string{"providerID": config.Provider, "id": config.Model},
|
||||
"model": model,
|
||||
"permissions": []map[string]string{{"action": "*", "resource": "*", "effect": "deny"}},
|
||||
})
|
||||
if err != nil {
|
||||
if variant := model["variant"]; variant != "" {
|
||||
err = fmt.Errorf("OpenCode model selection for reasoning_effort=%s (variant %q) failed: %w", variant, variant, err)
|
||||
}
|
||||
// No prompt or tool call was admitted: a request failure here is a
|
||||
// reachable retry rather than a reason to end the run.
|
||||
return "", harnessUnreachable(err)
|
||||
|
||||
Reference in New Issue
Block a user