mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 03:50:20 +00:00
chore: apply local workspace updates (#9911)
* chore: apply local workspace updates * fix: resolve prep findings after rebase (#9898) (thanks @gumadeiras) * refactor: centralize model allowlist normalization (#9898) (thanks @gumadeiras) * fix: guard model allowlist initialization (#9911) * docs: update changelog scope for #9911 * docs: remove model names from changelog entry (#9911) * fix: satisfy type-aware lint in model allowlist (#9911)
This commit is contained in:
committed by
GitHub
parent
93b450349f
commit
4629054403
@@ -154,7 +154,7 @@ describe("directive behavior", () => {
|
||||
|
||||
const texts = (Array.isArray(res) ? res : [res]).map((entry) => entry?.text).filter(Boolean);
|
||||
expect(texts).toContain(
|
||||
'Thinking level "xhigh" is only supported for openai/gpt-5.2, openai-codex/gpt-5.2-codex or openai-codex/gpt-5.1-codex.',
|
||||
'Thinking level "xhigh" is only supported for openai/gpt-5.2, openai-codex/gpt-5.3-codex, openai-codex/gpt-5.2-codex or openai-codex/gpt-5.1-codex.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
export type ResponsePrefixContext = {
|
||||
/** Short model name (e.g., "gpt-5.2", "claude-opus-4-5") */
|
||||
/** Short model name (e.g., "gpt-5.2", "claude-opus-4-6") */
|
||||
model?: string;
|
||||
/** Full model ID including provider (e.g., "openai-codex/gpt-5.2") */
|
||||
modelFull?: string;
|
||||
@@ -71,12 +71,12 @@ export function resolveResponsePrefixTemplate(
|
||||
*
|
||||
* Strips:
|
||||
* - Provider prefix (e.g., "openai/" from "openai/gpt-5.2")
|
||||
* - Date suffixes (e.g., "-20251101" from "claude-opus-4-5-20251101")
|
||||
* - Date suffixes (e.g., "-20260205" from "claude-opus-4-6-20260205")
|
||||
* - Common version suffixes (e.g., "-latest")
|
||||
*
|
||||
* @example
|
||||
* extractShortModelName("openai-codex/gpt-5.2") // "gpt-5.2"
|
||||
* extractShortModelName("claude-opus-4-5-20251101") // "claude-opus-4-5"
|
||||
* extractShortModelName("claude-opus-4-6-20260205") // "claude-opus-4-6"
|
||||
* extractShortModelName("gpt-5.2-latest") // "gpt-5.2"
|
||||
*/
|
||||
export function extractShortModelName(fullModel: string): string {
|
||||
|
||||
@@ -23,6 +23,7 @@ describe("normalizeThinkLevel", () => {
|
||||
describe("listThinkingLevels", () => {
|
||||
it("includes xhigh for codex models", () => {
|
||||
expect(listThinkingLevels(undefined, "gpt-5.2-codex")).toContain("xhigh");
|
||||
expect(listThinkingLevels(undefined, "gpt-5.3-codex")).toContain("xhigh");
|
||||
});
|
||||
|
||||
it("includes xhigh for openai gpt-5.2", () => {
|
||||
|
||||
@@ -23,6 +23,7 @@ export function isBinaryThinkingProvider(provider?: string | null): boolean {
|
||||
|
||||
export const XHIGH_MODEL_REFS = [
|
||||
"openai/gpt-5.2",
|
||||
"openai-codex/gpt-5.3-codex",
|
||||
"openai-codex/gpt-5.2-codex",
|
||||
"openai-codex/gpt-5.1-codex",
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user