Skip to content

Conversation

@DEVMANISHOFFL
Copy link
Contributor

@DEVMANISHOFFL DEVMANISHOFFL commented Jan 6, 2026

Description

This PR addresses #5018 by updating the API schema. It adds support for the new web_search_options request parameter and the annotations response field.

This sets the stage for implementing "Deep Research" and web search features. It enables the API to process these fields according to the OpenAI specifications.

Notes for Reviewers

  • Added WebSearchOptions, UserLocation, and ApproximateLocation structs to pkg/schema/openai.go or core/schema/openai.go.

  • Added UrlCitation and Annotation structs to support search citations in responses.

  • Updated OpenAIRequest to include WebSearchOptions.

  • Updated Message struct to include Annotations.

  • This PR only updates the schema definitions; backend implementation logic will come in future PRs.

Signed commits

  • Yes, I signed my commits.

@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit f9bc6c9
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/695cdae0efa66c00085d5270
😎 Deploy Preview https://deploy-preview-7885--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: devmanishofficial <devmanishofficial@gmail.com>
@DEVMANISHOFFL DEVMANISHOFFL force-pushed the feat/web-search-schema branch from a5d7863 to e5387d9 Compare January 6, 2026 06:38
Signed-off-by: devmanishofficial <devmanishofficial@gmail.com>
}

func (s *SimpleSearch) Search(ctx context.Context, query string) ([]schema.UrlCitation, error) {
// TODO: Implement actual DuckDuckGo, Google Custom Search, or browsing logic here.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but I'm slightly against committing unused code or incomplete features. This would make sense to merge to me only once it's complete.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - as we already support MCP, would be nice here to plug that in instead of including e.g. a scraper in the LocalAI code.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants