Revert "fix: use API-supported docs i18n model"

This reverts commit d6d0506135.
This commit is contained in:
Peter Steinberger
2026-04-28 04:54:57 +01:00
parent fed337b164
commit f6c0aa256e
3 changed files with 7 additions and 9 deletions

View File

@@ -231,13 +231,11 @@ func previewCommandOutput(stdout, stderr string) string {
return "no output"
}
combined = strings.Join(strings.Fields(combined), " ")
const limit = 900
const limit = 500
if len(combined) <= limit {
return combined
}
const headLimit = 350
const tailLimit = limit - headLimit
return combined[:headLimit] + " ... " + combined[len(combined)-tailLimit:]
return combined[:limit] + "..."
}
func sleepWithContext(ctx context.Context, delay time.Duration) error {

View File

@@ -158,7 +158,7 @@ printf 'translated from codex\n' > "$out"
got, err := runCodexExecPrompt(context.Background(), codexPromptRequest{
SystemPrompt: "Translate.",
Message: "Hello",
Model: "gpt-5.2",
Model: "gpt-5.5",
Thinking: "high",
})
if err != nil {
@@ -170,7 +170,7 @@ printf 'translated from codex\n' > "$out"
}
func TestPreviewCommandOutputFlattensAndTruncates(t *testing.T) {
input := "line one\n\nline two\tline three " + strings.Repeat("x", 1200)
input := "line one\n\nline two\tline three " + strings.Repeat("x", 600)
preview := previewCommandOutput(input, "")
if strings.Contains(preview, "\n") {
t.Fatalf("expected flattened whitespace, got %q", preview)
@@ -178,7 +178,7 @@ func TestPreviewCommandOutputFlattensAndTruncates(t *testing.T) {
if !strings.HasPrefix(preview, "line one line two line three ") {
t.Fatalf("unexpected preview prefix: %q", preview)
}
if !strings.Contains(preview, " ... ") {
t.Fatalf("expected truncation marker, got %q", preview)
if !strings.HasSuffix(preview, "...") {
t.Fatalf("expected truncation suffix, got %q", preview)
}
}

View File

@@ -15,7 +15,7 @@ const (
docsI18nEngineName = "codex"
envDocsI18nProvider = "OPENCLAW_DOCS_I18N_PROVIDER"
envDocsI18nModel = "OPENCLAW_DOCS_I18N_MODEL"
defaultOpenAIModel = "gpt-5.2"
defaultOpenAIModel = "gpt-5.5"
defaultFallbackProvider = "openai"
defaultFallbackModelName = defaultOpenAIModel
)