Skip to content

Conversation

@shiningstone23
Copy link

Add a flexible provider that can connect to any HTTP-based LLM API using configuration-driven request/response mapping.

Features:

  • JSON configuration schema for defining custom LLM API integrations
  • Template variable substitution for requests (${VAR}, ${VAR:number}, etc.)
  • JSONPath-based response parsing ($.content, $.error, etc.)
  • Multiple authentication methods (Bearer, Header, Basic, Query)
  • SSE/Chunked streaming support
  • Tool injection for LLMs without native tool calling support
  • Skip SSL verification option for self-signed certificates
  • Custom environment variable prefix support

Usage:

  1. Create a JSON config file in ~/.config/goose/custom_providers/
  2. Define endpoint, auth, request template, and response parsing
  3. Run goose configure to set up the provider

Example config: crates/goose/examples/generic_http_provider.json

Summary

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Related Issues

Relates to #ISSUE_ID
Discussion: LINK (if any)

Screenshots/Demos (for UX changes)

Before:

After:

Add a flexible provider that can connect to any HTTP-based LLM API
using configuration-driven request/response mapping.

Features:
- JSON configuration schema for defining custom LLM API integrations
- Template variable substitution for requests (${VAR}, ${VAR:number}, etc.)
- JSONPath-based response parsing ($.content, $.error, etc.)
- Multiple authentication methods (Bearer, Header, Basic, Query)
- SSE/Chunked streaming support
- Tool injection for LLMs without native tool calling support
- Skip SSL verification option for self-signed certificates
- Custom environment variable prefix support

Usage:
1. Create a JSON config file in ~/.config/goose/custom_providers/
2. Define endpoint, auth, request template, and response parsing
3. Run `goose configure` to set up the provider

Example config: crates/goose/examples/generic_http_provider.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DOsinga
Copy link
Collaborator

DOsinga commented Jan 8, 2026

thanks for the contribution. what is the advantage over this over the current approach of custom providers? I see this has more fields, but can't we just add those to custom providers, rather than ending up with what is effectively two different json formats to specify a generic provider? haven't looked closely at the code so I might be missing something here of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants