Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Include x-coding-assistant=open-interpreter header in litellm calls #1586

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.

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

Open
jhrozek wants to merge 1 commit into openinterpreter:main
base: main
Choose a base branch
Loading
from jhrozek:header

Conversation

Copy link

@jhrozek jhrozek commented Jan 31, 2025

Describe the changes you have made:

Proxies that inspect traffic between the development environment and an
LLM might be interested in whether it's OI or another tool calling in
order to be able to inspect and/or modify the payload.

The most common way of solving this would be to add a user-agent header.
However, litellm which OI uses calls into OpenAI libraries directly
when making the request and it seems like the only way to set a custom
http_client. This seemed like something that might have unforeseen
consequences (timeouts? retries?). For other LLMs, litellm seems to use
its own httpx wrapper which might presumably be easier to customize, but
I have not tried.

To make things easier, let's just add an OI specific header. I put the
string OI followed by the version there, but the value - and indeed the key

  • of the header are not that interesting, what I would like to do is to just
    be able to to tell OI calls.

Reference any relevant issues (e.g. "Fixes #000"):

N/A

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows
  • Tested on MacOS
  • Tested on Linux

Proxies that inspect traffic between the development environment and an
LLM might be interested in whether it's OI or another tool calling in
order to be able to inspect and/or modify the payload.
The most common way of solving this would be to add a `user-agent` header.
However, litellm which OI uses calls into OpenAI libraries directly
when making the request and it seems like the only way to set a custom
`http_client`. This seemed like something that might have unforeseen
consequences (timeouts? retries?). For other LLMs, litellm seems to use
its own httpx wrapper which might presumably be easier to customize, but
I have not tried.
To make things easier, let's just add an OI specific header. I put the
string OI followed by the version there, but the value - and indeed the key
- of the header are not that interesting, what I would like to do is to just
be able to to tell OI calls.
Copy link
Author

jhrozek commented Feb 6, 2025

@KillianLucas is this something that OpenInterpreter would be interested in merging?

endolith reacted with confused emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /