mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
fix: normalize xhigh aliases and docs sync (#9976)
This commit is contained in:
@@ -16,7 +16,7 @@ title: "Thinking Levels"
|
||||
- medium → “think harder”
|
||||
- high → “ultrathink” (max budget)
|
||||
- xhigh → “ultrathink+” (GPT-5.2 + Codex models only)
|
||||
- `x-high` and `extra-high` map to `xhigh`.
|
||||
- `x-high`, `x_high`, `extra-high`, `extra high`, and `extra_high` map to `xhigh`.
|
||||
- `highest`, `max` map to `high`.
|
||||
- Provider notes:
|
||||
- Z.AI (`zai/*`) only supports binary thinking (`on`/`off`). Any non-`off` level is treated as `on` (mapped to `low`).
|
||||
|
||||
@@ -11,8 +11,23 @@ describe("normalizeThinkLevel", () => {
|
||||
expect(normalizeThinkLevel("mid")).toBe("medium");
|
||||
});
|
||||
|
||||
it("accepts xhigh", () => {
|
||||
it("accepts xhigh aliases", () => {
|
||||
expect(normalizeThinkLevel("xhigh")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel("x-high")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel("x_high")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel("x high")).toBe("xhigh");
|
||||
});
|
||||
|
||||
it("accepts extra-high aliases as xhigh", () => {
|
||||
expect(normalizeThinkLevel("extra-high")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel("extra high")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel("extra_high")).toBe("xhigh");
|
||||
expect(normalizeThinkLevel(" extra high ")).toBe("xhigh");
|
||||
});
|
||||
|
||||
it("does not over-match nearby xhigh words", () => {
|
||||
expect(normalizeThinkLevel("extra-highest")).toBeUndefined();
|
||||
expect(normalizeThinkLevel("xhigher")).toBeUndefined();
|
||||
});
|
||||
|
||||
it("accepts extra-high aliases as xhigh", () => {
|
||||
|
||||
Reference in New Issue
Block a user