Skip to content

Commit d443e11

Browse files
committed
fix: satisfy SwiftLint for 2026.2.5 parity
1 parent 24a7326 commit d443e11

4 files changed

Lines changed: 52 additions & 7 deletions

File tree

Scripts/protocol-gen-swift.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ async function readUpstreamSnapshot() {
4141
}
4242
}
4343

44-
const body = await readUpstreamSnapshot();
44+
const upstreamBody = await readUpstreamSnapshot();
45+
const body = upstreamBody.replace(
46+
"// swiftlint:disable file_length",
47+
"// swiftlint:disable file_length missing_docs",
48+
);
4549
await fs.writeFile(outPath, body);
4650
console.log(
4751
`Synced ${outPath} from ${upstreamLabel} (${upstreamCommit})`,

Sources/OpenClawModels/ProviderCatalog.swift

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,53 @@ public enum OpenClawReferenceProviderCatalog {
114114
entry("openai-codex", "OpenAI Codex", api: .openAICodexResponses, auth: .oauth, baseURL: "https://chatgpt.com/backend-api", modelID: "gpt-5.5"),
115115
entry("opencode", "OpenCode Zen", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.opencode.ai/v1", modelID: "claude-opus-4-6"),
116116
entry("opencode-go", "OpenCode Go", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.opencode.ai/v1", modelID: "kimi-k2.5"),
117-
entry("anthropic-vertex", "Anthropic Vertex", api: .anthropicMessages, auth: .apiKey, baseURL: "https://aiplatform.googleapis.com", modelID: "claude-sonnet-4-6", inputs: [.text, .image], reasoning: true),
118-
entry("amazon-bedrock-mantle", "Amazon Bedrock Mantle", api: .openAICompletions, auth: .apiKey, baseURL: "https://bedrock-mantle.us-east-1.api.aws/v1", modelID: "openai.gpt-oss-120b", reasoning: true),
117+
entry(
118+
"anthropic-vertex",
119+
"Anthropic Vertex",
120+
api: .anthropicMessages,
121+
auth: .apiKey,
122+
baseURL: "https://aiplatform.googleapis.com",
123+
modelID: "claude-sonnet-4-6",
124+
inputs: [.text, .image],
125+
reasoning: true
126+
),
127+
entry(
128+
"amazon-bedrock-mantle",
129+
"Amazon Bedrock Mantle",
130+
api: .openAICompletions,
131+
auth: .apiKey,
132+
baseURL: "https://bedrock-mantle.us-east-1.api.aws/v1",
133+
modelID: "openai.gpt-oss-120b",
134+
reasoning: true
135+
),
119136
entry("arcee", "Arcee AI", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.arcee.ai/api/v1", modelID: "trinity-large-thinking", reasoning: true),
120137
entry("chutes", "Chutes", api: .openAICompletions, auth: .apiKey, baseURL: "https://llm.chutes.ai/v1", modelID: "zai-org/GLM-4.7-TEE", reasoning: true),
121138
entry("copilot-proxy", "Copilot Proxy", api: .openAICompletions, auth: nil, baseURL: "http://localhost:3000/v1", modelID: "gpt-5.2", inputs: [.text, .image]),
122139
entry("deepseek", "DeepSeek", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.deepseek.com", modelID: "deepseek-v4-flash", reasoning: true),
123-
entry("fireworks", "Fireworks", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.fireworks.ai/inference/v1", modelID: "accounts/fireworks/routers/kimi-k2p5-turbo", inputs: [.text, .image]),
140+
entry(
141+
"fireworks",
142+
"Fireworks",
143+
api: .openAICompletions,
144+
auth: .apiKey,
145+
baseURL: "https://api.fireworks.ai/inference/v1",
146+
modelID: "accounts/fireworks/routers/kimi-k2p5-turbo",
147+
inputs: [.text, .image]
148+
),
124149
entry("lmstudio", "LM Studio", capabilities: [.text, .memoryEmbedding], api: .openAICompletions, auth: nil, baseURL: "http://localhost:1234/v1", modelID: "qwen/qwen3.5-9b"),
125150
entry("microsoft-foundry", "Microsoft Foundry", api: .openAIResponses, auth: .oauth, baseURL: "https://example.services.ai.azure.com/openai/v1", modelID: "gpt-5", inputs: [.text, .image]),
126151
entry("qwen", "Qwen", api: .openAICompletions, auth: .apiKey, baseURL: "https://coding-intl.dashscope.aliyuncs.com/v1", modelID: "qwen3.5-plus", inputs: [.text, .image]),
127152
entry("stepfun", "StepFun", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.stepfun.ai/v1", modelID: "step-3.5-flash", reasoning: true),
128153
entry("stepfun-plan", "StepFun Plan", api: .openAICompletions, auth: .apiKey, baseURL: "https://api.stepfun.ai/step_plan/v1", modelID: "step-3.5-flash", reasoning: true),
129-
entry("tencent-tokenhub", "Tencent TokenHub", aliases: ["tencent"], api: .openAICompletions, auth: .apiKey, baseURL: "https://tokenhub.tencentmaas.com/v1", modelID: "hy3-preview", reasoning: true),
154+
entry(
155+
"tencent-tokenhub",
156+
"Tencent TokenHub",
157+
aliases: ["tencent"],
158+
api: .openAICompletions,
159+
auth: .apiKey,
160+
baseURL: "https://tokenhub.tencentmaas.com/v1",
161+
modelID: "hy3-preview",
162+
reasoning: true
163+
),
130164
entry(
131165
"google-vertex",
132166
"Google Vertex",

Sources/OpenClawProtocol/GatewayModels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated by scripts/protocol-gen-swift.ts — do not edit by hand
2-
// swiftlint:disable file_length
2+
// swiftlint:disable file_length missing_docs
33
import Foundation
44

55
public let GATEWAY_PROTOCOL_VERSION = 3

Tests/OpenClawKitTests/ProviderCatalogReferenceFixture.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,14 @@ enum ProviderCatalogReferenceFixture {
7070
.init(providerID: "copilot-proxy", auth: nil, api: .openAICompletions, baseURL: "http://localhost:3000/v1", defaultModelID: "gpt-5.2"),
7171
.init(providerID: "deepseek", auth: .apiKey, api: .openAICompletions, baseURL: "https://api.deepseek.com", defaultModelID: "deepseek-v4-flash"),
7272
.init(providerID: "fireworks", auth: .apiKey, api: .openAICompletions, baseURL: "https://api.fireworks.ai/inference/v1", defaultModelID: "accounts/fireworks/routers/kimi-k2p5-turbo"),
73-
.init(providerID: "lmstudio", auth: nil, api: .openAICompletions, baseURL: "http://localhost:1234/v1", defaultModelID: "qwen/qwen3.5-9b", capabilities: [.text, .memoryEmbedding]),
73+
.init(
74+
providerID: "lmstudio",
75+
auth: nil,
76+
api: .openAICompletions,
77+
baseURL: "http://localhost:1234/v1",
78+
defaultModelID: "qwen/qwen3.5-9b",
79+
capabilities: [.text, .memoryEmbedding]
80+
),
7481
.init(providerID: "microsoft-foundry", auth: .oauth, api: .openAIResponses, baseURL: "https://example.services.ai.azure.com/openai/v1", defaultModelID: "gpt-5"),
7582
.init(providerID: "qwen", auth: .apiKey, api: .openAICompletions, baseURL: "https://coding-intl.dashscope.aliyuncs.com/v1", defaultModelID: "qwen3.5-plus"),
7683
.init(providerID: "stepfun", auth: .apiKey, api: .openAICompletions, baseURL: "https://api.stepfun.ai/v1", defaultModelID: "step-3.5-flash"),

0 commit comments

Comments
 (0)