docs: add OpenCode guide, split Goose out, fix LibreChat accuracy - #52
Merged
Merged
Conversation
Add a dedicated OpenCode integration guide and separate Goose onto its own page, then correct stale facts found while verifying both against the live gateway. OpenCode (new page): - models.dev now carries the `nearai` provider, so the minimum config is a single `model` line with no provider block. Verified end to end against OpenCode 1.18.31. - Cover the cases that still need config: models newer than the catalog, trimming the 50+ model picker, and direct completions. Goose (cloud/guides/opencode-goose.mdx, now Goose-only): - Document the current nested `active_provider`/`providers` config shape. The flat GOOSE_PROVIDER/GOOSE_MODEL keys the page used are legacy and migrated on update; they remain valid as environment variables. - Goose's provider does dynamic model discovery, so reframe "refresh models" around that rather than manual workarounds. - Drop https://glm-5-2.completions.near.ai/v1, which no longer resolves. LibreChat: - Smoke test used max_tokens: 20 against a reasoning model, returning content: null with finish_reason: length. Raised to 256. - Add customParams.reasoningKey: reasoning_content so reasoning output renders; the gateway streams it in that field. - Move titleModel off a reasoning model to google/gemini-2.5-flash-lite. - Config version 1.3.13 -> 1.3.16 to match librechat.example.yaml. - Soften the blanket "do not add a provider field"; it is accurate only for the OpenAI-compatible path. Across all three: - z-ai/glm-5.2 -> z-ai/glm-5.3-flash. The old ID survives only as an alias, noted inline on each page. Goose steps come from Goose's published docs and repository; they were not run against a local install. Everything else was executed live. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drop google/gemini-2.5-flash-lite from the LibreChat guide and keep one model throughout: models.default and titleModel both use z-ai/glm-5.3-flash. The title-generation note now states the reasoning cost and points at current_model rather than adding a second model. Lead the OpenCode Model ID section with z-ai/glm-5.3-flash alone and narrow the whitelist example to it. The OpenCode catalog-models example keeps a models.dev model, anthropic/claude-haiku-4-5, because that section exists to show the zero-config path and z-ai/glm-5.3-flash is not in the catalog yet. Added a line saying so and pointing at the check under Refresh models. Verified against OpenCode 1.18.31. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a dedicated OpenCode integration guide, separates Goose onto its own page, and corrects stale facts found while verifying both against the live gateway.
OpenCode — new page
cloud/guides/integrations/opencode.mdx, following the section contract in.github/INTEGRATION_GUIDE_TEMPLATE.md.The thing that shaped the page: models.dev now carries the
nearaiprovider, so OpenCode needs no provider block at all. The minimum working config is a singlemodelline. The guide then covers the three cases that still need config — models newer than the catalog, trimming the 50+ model picker, and direct completions.Verified end to end against OpenCode
1.18.31:modelline +NEARAI_API_KEY)opencode run→near-ai-okprovider.nearai.modelsentrynear-ai-okonz-ai/glm-5.3-flashbaseURLoverridenear-ai-okviaglm-5-3-flash.completions.near.ai/v1opencode models nearaiGoose — split onto its own page
cloud/guides/opencode-goose.mdxis now Goose-only. Rewritten rather than trimmed, because verification turned up two errors:GOOSE_PROVIDER/GOOSE_MODELkeys. Current Goose uses nestedactive_provider/providers. The old form is read for compatibility and migrated on update, so it wasn't broken — just legacy. Both are now documented, since those names remain valid as environment variables.Also removed
https://glm-5-2.completions.near.ai/v1, which no longer resolves (TLS connect failure).LibreChat — accuracy fixes
max_tokens: 20against a reasoning model returnscontent: nullwithfinish_reason: length— 61 of 66 completion tokens went toreasoning_content. The guide then told readers to go fix their key or network path. Raised to256.customParams.reasoningFormat/reasoningKey: reasoning_content; the gateway streams the trace in that field.titleModelwas a reasoning model, paying for a reasoning pass on every conversation title. Moved togoogle/gemini-2.5-flash-lite.version: 1.3.13→1.3.16, matching upstreamlibrechat.example.yaml.providerfield" — accurate for the OpenAI-compatible path, but it forecloses the native Anthropic one.Across all three
z-ai/glm-5.2→z-ai/glm-5.3-flash. The old ID survives only as an alias onto its successor, which is now noted inline on each page.Reviewer notes
block/goose's ownproviders.md, stated as such in Sources Checked. Worth a real Goose run before merge. One loose end: NEAR AI Cloud appears in Goose's docs and provider table, but there is nonear*file undercrates/goose/src/providers/onmain, so the config keynearaiis inferred from theNEARAI_API_KEYconvention rather than confirmed in source./cloud/guides/opencode-goose. Renaming it tocloud/guides/integrations/goose.mdxwould match its siblings but needs aredirectsentry. Left out of this PR deliberately./v1/messagesis undocumented. The gateway serves a native Anthropic Messages endpoint pluscount_tokens— verified working with streaming and tool use — but neither appears inapi-reference/openapi.json, so they are absent from the API Reference tab. Upstream spec gap; it also blocks documenting LibreChat'sprovider: anthropicpath.<Note>is now duplicated across pages. If it keeps spreading it probably belongs inmodel-discovery.mdx.mint validateandmint broken-linksboth pass.🤖 Generated with Claude Code