GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode: added logic to probe loaded models from lmstudio, ollama an… by goniz · Pull Request #11951 · anomalyco/opencode

opencode: added logic to probe loaded models from lmstudio, ollama an… #11951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
goniz wants to merge 13 commits into anomalyco:models-endpoint from goniz:models-endpoint-pr

Uh oh!

There was an error while loading. Please reload this page.

Closed

opencode: added logic to probe loaded models from lmstudio, ollama an… #11951

Changes from 1 commit
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
9a47124
opencode: added logic to probe loaded models from lmstudio, ollama an…
goniz Jan 15, 2026
7cd5036
opencode: added local provider url detection
goniz Feb 3, 2026
d07ee24
fix: prevent authorization header from using dummy API key
goniz Feb 3, 2026
10ff727
opencode: initial integration of ProviderModelDetection and LocalProv…
goniz Feb 3, 2026
d54adfb
fix: normalize local provider base urls
goniz Feb 3, 2026
8c10e02
fix: set api id for detected models
goniz Feb 3, 2026
4e4d154
refactor: updated debug provider commands
goniz Feb 3, 2026
fd5aede
fix: comment out adding new models
goniz Feb 3, 2026
75ded5e
fix: prevent local provider detection from running on cloud providers
goniz Feb 3, 2026
2c215da
fix: correct command order and naming for provider commands
goniz Feb 3, 2026
ff2f866
fix: remove 'object' field from OpenAICompatibleResponse causing errors
goniz Feb 3, 2026
1cd128d
add vLLM local provider support
goniz Feb 12, 2026
04a3e4e
add local provider setup in auth login
goniz Feb 13, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: updated debug provider commands
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@goniz
goniz committed Feb 3, 2026
commit 4e4d154bfb71b7813c4e16b9f37bdec58c257f88

There are no files selected for viewing

92 changes: 65 additions & 27 deletions 92 packages/opencode/src/cli/cmd/debug/provider.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,40 +1,78 @@
import { EOL } from "os"
import { LocalProvider, type LocalModel } from "../../../provider/local"
import { ProviderModelDetection } from "@/provider/model-detection"
import { LocalProvider } from "@/provider/local"
import { cmd } from "../cmd"
import { Provider } from "@/provider/provider"
import { Instance } from "@/project/instance"

export const ProviderCommand = cmd({
command: "provider",
describe: "probe local LLM providers",
describe: "Provider debugging utilities",
builder: (yargs) => yargs.command(ProviderProbeCommand).command(ProviderDetectCommand).demandCommand(),
async handler() { },
})

export const ProviderDetectCommand = cmd({
command: "probe provider <providerId>",
describe: "probe models by provider ID",
builder: (yargs) =>
yargs.command({
command: "probe <url>",
describe: "probe a local provider for loaded models",
builder: (yargs) =>
yargs
.positional("url", {
describe: "provider URL",
type: "string",
}),
async handler(args) {
const url = args.url as string

const type = await LocalProvider.detect_provider(url);
if (!type) {
console.error(`No supported local provider detected at URL: ${url}`)
yargs
.positional("providerId", {
describe: "provider ID",
type: "string",
}),
async handler(args) {
const providerId = args.providerId as string

await Instance.provide({
directory: process.cwd(),
async fn() {
const provider = await Provider.getProvider(providerId)
if (!provider) {
console.error(`Provider with ID '${providerId}' not found.`)
process.exit(1)
}

console.log(`Detected provider type: ${type} at URL: ${url}`)
const result = await LocalProvider.probe_provider(type, url)

if (result.length === 0) {
console.log("No loaded models found")
console.log(`Detecting models for provider ID: ${providerId}`)
const detectionResult = await ProviderModelDetection.detect(provider)
if (!detectionResult) {
console.log("No models detected.")
return
}

console.log(`Found ${result.length} loaded models:`)
console.log(JSON.stringify(result, null, 2))
console.log(`Detected ${detectionResult.length} models:`)
console.log(JSON.stringify(detectionResult, null, 2))
},
}),
async handler() {},
})
},
})

export const ProviderProbeCommand = cmd({
command: "probe url <url>",
describe: "probe local provider by URL",
builder: (yargs) =>
yargs
.positional("url", {
describe: "provider URL",
type: "string",
}),
async handler(args) {
const url = args.url as string

const type = await LocalProvider.detect_provider(url);
if (!type) {
console.error(`No supported local provider detected at URL: ${url}`)
process.exit(1)
}

console.log(`Detected provider type: ${type} at URL: ${url}`)
const result = await LocalProvider.probe_provider(type, url)

if (result.length === 0) {
console.log("No loaded models found")
return
}

console.log(`Found ${result.length} loaded models:`)
console.log(JSON.stringify(result, null, 2))
},
})
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.