Skip to content
This repository was archived by the owner on Jan 24, 2026. It is now read-only.

Commit 7205c47

Browse files
committed
docs: update docs
1 parent 44f6bfc commit 7205c47

3 files changed

Lines changed: 323 additions & 5 deletions

File tree

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Powered by Ktor and kotlinx.serialization. Thanks to their no-reflex features.
66

77
## Currently supported
88

9-
Proxy from: OpenAI, DashScope(Alibaba Qwen), Gemini, Deepseek, Mistral, SiliconFlow.
9+
Proxy from: OpenAI, Claude, DashScope(Alibaba Qwen), Gemini, Deepseek, Mistral, SiliconFlow.
1010

1111
Proxy as: LM Studio, Ollama.
1212

@@ -20,8 +20,8 @@ Run the application, and you will see a help message:
2020

2121
```
2222
2025-05-02 10:43:53 INFO Help - It looks that you are starting the program for the first time here.
23-
2025-05-02 10:43:53 INFO Help - A default config file is created at E:\ACodeSpace\local\OpenAI2LmStudioProxy\OpenAI2LmStudioProxy\build\native\nativeCompile\config.yml with schema annotation.
24-
2025-05-02 10:43:53 INFO Config - Config file watcher started at E:\ACodeSpace\local\OpenAI2LmStudioProxy\OpenAI2LmStudioProxy\build\native\nativeCompile\config.yml
23+
2025-05-02 10:43:53 INFO Help - A default config file is created at your_path\config.yml with schema annotation.
24+
2025-05-02 10:43:53 INFO Config - Config file watcher started at your_path\config.yml
2525
2025-05-02 10:43:53 INFO LM Studio Server - LM Studio Server started at 1234
2626
2025-05-02 10:43:53 INFO Ollama Server - Ollama Server started at 11434
2727
2025-05-02 10:43:53 INFO Model List - Model list loaded with: []
@@ -38,7 +38,7 @@ When first generating the config file, it will be created with schema annotation
3838
## Example config file
3939

4040
```yaml
41-
# $schema: https://github.com/Stream29/ProxyAsLocalModel/raw/master/config_v1.schema.json
41+
# $schema: https://github.com/Stream29/ProxyAsLocalModel/raw/master/config_v2.schema.json
4242
lmStudio:
4343
port: 1234 # This is default value
4444
enabled: true # This is default value
@@ -59,6 +59,11 @@ apiProviders:
5959
apiKey: <your_api_key>
6060
modelList:
6161
- gpt-4o
62+
Claude:
63+
type: Claude
64+
apiKey: <your_api_key>
65+
modelList:
66+
- claude-3-7-sonnet
6267
Qwen:
6368
type: DashScope
6469
apiKey: <your_api_key>

config_v2.schema.json

Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"lmStudio": {
5+
"type": "object",
6+
"properties": {
7+
"port": {
8+
"type": "integer",
9+
"minimum": -2147483648,
10+
"maximum": 2147483647
11+
},
12+
"host": {
13+
"type": "string"
14+
},
15+
"enabled": {
16+
"type": "boolean"
17+
}
18+
}
19+
},
20+
"ollama": {
21+
"type": "object",
22+
"properties": {
23+
"port": {
24+
"type": "integer",
25+
"minimum": -2147483648,
26+
"maximum": 2147483647
27+
},
28+
"host": {
29+
"type": "string"
30+
},
31+
"enabled": {
32+
"type": "boolean"
33+
}
34+
}
35+
},
36+
"client": {
37+
"type": "object",
38+
"properties": {
39+
"socketTimeout": {
40+
"type": "integer"
41+
},
42+
"connectTimeout": {
43+
"type": "integer"
44+
},
45+
"requestTimeout": {
46+
"type": "integer"
47+
},
48+
"retry": {
49+
"type": "integer",
50+
"minimum": -2147483648,
51+
"maximum": 2147483647
52+
},
53+
"delayBeforeRetry": {
54+
"type": "integer"
55+
}
56+
}
57+
},
58+
"apiProviders": {
59+
"type": "object",
60+
"additionalProperties": {
61+
"$ref": "#/$defs/ApiProvider"
62+
}
63+
}
64+
},
65+
"$defs": {
66+
"ApiProvider": {
67+
"anyOf": [
68+
{
69+
"allOf": [
70+
{
71+
"type": "object",
72+
"properties": {
73+
"apiKey": {
74+
"type": "string"
75+
},
76+
"modelList": {
77+
"type": "array",
78+
"items": {
79+
"type": "string"
80+
}
81+
}
82+
},
83+
"required": [
84+
"apiKey",
85+
"modelList"
86+
]
87+
},
88+
{
89+
"properties": {
90+
"type": {
91+
"enum": [
92+
"Claude"
93+
]
94+
}
95+
},
96+
"required": [
97+
"type"
98+
]
99+
}
100+
]
101+
},
102+
{
103+
"allOf": [
104+
{
105+
"type": "object",
106+
"properties": {
107+
"apiKey": {
108+
"type": "string"
109+
},
110+
"modelList": {
111+
"type": "array",
112+
"items": {
113+
"type": "string"
114+
}
115+
}
116+
},
117+
"required": [
118+
"apiKey"
119+
]
120+
},
121+
{
122+
"properties": {
123+
"type": {
124+
"enum": [
125+
"DashScope"
126+
]
127+
}
128+
},
129+
"required": [
130+
"type"
131+
]
132+
}
133+
]
134+
},
135+
{
136+
"allOf": [
137+
{
138+
"type": "object",
139+
"properties": {
140+
"apiKey": {
141+
"type": "string"
142+
},
143+
"modelList": {
144+
"type": "array",
145+
"items": {
146+
"type": "string"
147+
}
148+
}
149+
},
150+
"required": [
151+
"apiKey"
152+
]
153+
},
154+
{
155+
"properties": {
156+
"type": {
157+
"enum": [
158+
"DeepSeek"
159+
]
160+
}
161+
},
162+
"required": [
163+
"type"
164+
]
165+
}
166+
]
167+
},
168+
{
169+
"allOf": [
170+
{
171+
"type": "object",
172+
"properties": {
173+
"apiKey": {
174+
"type": "string"
175+
},
176+
"modelList": {
177+
"type": "array",
178+
"items": {
179+
"type": "string"
180+
}
181+
}
182+
},
183+
"required": [
184+
"apiKey",
185+
"modelList"
186+
]
187+
},
188+
{
189+
"properties": {
190+
"type": {
191+
"enum": [
192+
"Gemini"
193+
]
194+
}
195+
},
196+
"required": [
197+
"type"
198+
]
199+
}
200+
]
201+
},
202+
{
203+
"allOf": [
204+
{
205+
"type": "object",
206+
"properties": {
207+
"apiKey": {
208+
"type": "string"
209+
},
210+
"modelList": {
211+
"type": "array",
212+
"items": {
213+
"type": "string"
214+
}
215+
}
216+
},
217+
"required": [
218+
"apiKey"
219+
]
220+
},
221+
{
222+
"properties": {
223+
"type": {
224+
"enum": [
225+
"Mistral"
226+
]
227+
}
228+
},
229+
"required": [
230+
"type"
231+
]
232+
}
233+
]
234+
},
235+
{
236+
"allOf": [
237+
{
238+
"type": "object",
239+
"properties": {
240+
"baseUrl": {
241+
"type": "string"
242+
},
243+
"apiKey": {
244+
"type": "string"
245+
},
246+
"modelList": {
247+
"type": "array",
248+
"items": {
249+
"type": "string"
250+
}
251+
},
252+
"extraRequest": {
253+
"anyOf": []
254+
}
255+
},
256+
"required": [
257+
"baseUrl",
258+
"apiKey",
259+
"modelList"
260+
]
261+
},
262+
{
263+
"properties": {
264+
"type": {
265+
"enum": [
266+
"OpenAi"
267+
]
268+
}
269+
},
270+
"required": [
271+
"type"
272+
]
273+
}
274+
]
275+
},
276+
{
277+
"allOf": [
278+
{
279+
"type": "object",
280+
"properties": {
281+
"apiKey": {
282+
"type": "string"
283+
},
284+
"modelList": {
285+
"type": "array",
286+
"items": {
287+
"type": "string"
288+
}
289+
}
290+
},
291+
"required": [
292+
"apiKey",
293+
"modelList"
294+
]
295+
},
296+
{
297+
"properties": {
298+
"type": {
299+
"enum": [
300+
"SiliconFlow"
301+
]
302+
}
303+
},
304+
"required": [
305+
"type"
306+
]
307+
}
308+
]
309+
}
310+
]
311+
}
312+
}
313+
}

src/main/kotlin/io/github/stream29/proxy/Global.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ val unused = {
6060
helpLogger.info("A default config file is created at ${configFile.absolutePath} with schema annotation.")
6161
configFile.writeText(
6262
"""
63-
# ${'$'}schema: https://github.com/Stream29/ProxyAsLocalModel/raw/master/config_v1.schema.json
63+
# ${'$'}schema: https://github.com/Stream29/ProxyAsLocalModel/raw/master/config_v2.schema.json
6464
lmStudio:
6565
port: 1234
6666
ollama:

0 commit comments

Comments
 (0)