Revert "Support basic auth in opencode sdk (#4697)"

This reverts commit b9253d0b3b.
This commit is contained in:
Aiden Cline 2025-11-24 23:12:00 -06:00
parent 997aacf7f0
commit 3b2aa7e91d

View file

@ -24,19 +24,6 @@ export function createOpencodeClient(config?: Config & { directory?: string }) {
}
}
if (config?.baseUrl) {
const baseUrl = new URL(config.baseUrl)
if (baseUrl.username || baseUrl.password) {
config.headers = {
...config.headers,
Authorization: `Basic ${btoa(`${baseUrl.username}:${baseUrl.password}`)}`,
}
baseUrl.username = ""
baseUrl.password = ""
config.baseUrl = baseUrl.toString()
}
}
const client = createClient(config)
return new OpencodeClient({ client })
}