opencode-morphllm 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/dist/router.js +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,17 +12,18 @@ In `~/.config/opencode/opencode.json`, add the following config:
|
|
|
12
12
|
]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
You can also set the `opencode-morphllm` config variables by creating a .env file at `~/.config/opencode
|
|
15
|
+
You can also set the `opencode-morphllm` config variables by creating a .env file at `~/.config/opencode/morph.json`. You can find the provider and model ids from https://models.dev
|
|
16
16
|
|
|
17
17
|
Example configs:
|
|
18
18
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"MORPH_API_KEY": "sk-I05oNc_g83uRY-T4iOE47vCWuqbkG_MOKNhbZqcmzU-aXuXQ",
|
|
22
|
+
"MORPH_MODEL_EASY": "github-copilot/gpt-5-mini",
|
|
23
|
+
"MORPH_MODEL_MEDIUM": "opencode/minimax-m2.1-free",
|
|
24
|
+
"MORPH_MODEL_HARD": "github-copilot/gemini-2.5-pro",
|
|
25
|
+
"MORPH_ROUTER_ENABLED": true
|
|
26
|
+
}
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
## Development
|
package/dist/router.js
CHANGED
|
@@ -38,9 +38,7 @@ export function createModelRouterHook() {
|
|
|
38
38
|
const chosen = pickModelForDifficulty(classification?.difficulty);
|
|
39
39
|
const finalProviderID = chosen.providerID || input.model.providerID;
|
|
40
40
|
const finalModelID = chosen.modelID || input.model.modelID;
|
|
41
|
-
|
|
42
|
-
`[Morph Router] Prompt classified as difficulty: ${classification?.difficulty}. Routing to model: ${finalProviderID}/${finalModelID}`
|
|
43
|
-
);
|
|
41
|
+
|
|
44
42
|
input.model.providerID = finalProviderID;
|
|
45
43
|
input.model.modelID = finalModelID;
|
|
46
44
|
},
|