Configure
Write this to~/.config/opencode/opencode.json for every project, or opencode.json in a project root for one.
Export your key, then start opencode:
Verify
opencode models lists what it resolved. Lyceum entries appear as lyceum/<model-id>:
Web search
opencode’s search tool is off for custom providers, so a Lyceum model reads pages withwebfetch when you give it a URL. To let it search, add web_search_options to the options of each model. Lyceum runs the searches and the model answers with its sources:
opencode.json
[1] and [2], and opencode doesn’t show the source links, so ask for the URLs in your prompt. Give any search tool you add yourself a name other than web_search. See Web search for options and pricing.
Notes
- Context limits. Add
"limit": { "context": 200000, "output": 131072 }to a model entry so opencode’s context compaction is accurate. Take each model’s context window from the models page. 131,072 is the most output Lyceum accepts per request, see request limits. - Default model. Without a top-level
"model", opencode uses the last model you picked.