r/opencode • • 17d ago

Give AI model in OpenCode web access

I *just* started using and configuring OpenConde, I connected a couple of OpenRouter free models and started toying with them.

One thing that really startled me is the absence of plain web access capability out of the box for any generic models. Am I doing something wrong?

I mean let the model browse the web from the IP of my machine, isn't something that the harness should do, should I install some tools/plugins?

TL;DR: what's the way to configure OpenCode to expose web access to any model running inside, how do you do on your local setup (just browse/fetch url/pages from the the local machine's IP)? (I would avoid external proxies or services)

Tnx!

1 Upvotes

4 comments sorted by

2

u/ncxxi 17d ago

It's already built-in. OpenCode can access the web via searches (similar to Google) and do website fetches with your own IP address. I'm using exa.ai for searches and web fetch. OpenCode also provide direct integration with exa so you can just paste your api key into it easily.

1

u/NothingSoStrange 17d ago

The nemotron model I was using was insisting he could not search; my feeling was that it was searching from the hosted server, rather than my local machine..

1

u/Ceextasy 17d ago

usually it should work by default?...

1

u/NothingSoStrange 17d ago

I was discussing yesterday evening with a Nemotron model that could not go and search, he was receiving "HTTP 402" errors.. very odd.