Skip to content

Conversation

@cmungall
Copy link
Contributor

Fixes #599

A longer term fix would be to use something like Pydantic so we don't repeat ourselves, but this would be a bit of a refactor

Fixes simonw#599 

A longer term fix would be to use something like Pydantic so we don't repeat ourselves, but this would be a bit of a refactor
@simonw
Copy link
Owner

simonw commented Nov 6, 2024

This fix doesn't look quite right to me.

The code currently defaults to assuming can_stream = True:

def __init__(
self,
model_id,
key=None,
model_name=None,
api_base=None,
api_type=None,
api_version=None,
api_engine=None,
headers=None,
can_stream=True,

With this change that will switch to assuming False (or None) for any models configured in the extra-openai-models.yaml file.

I think this should only take effect if can_models: False in the YAML.

@simonw simonw merged commit 3b2e526 into simonw:main Nov 6, 2024
1 of 31 checks passed
simonw added a commit that referenced this pull request Nov 14, 2024
simonw added a commit that referenced this pull request Nov 17, 2024
simonw added a commit that referenced this pull request Nov 18, 2024
fast-codi-expert added a commit to fast-codi-expert/LLM that referenced this pull request May 18, 2025
* Allow passing of can_stream in openai_models.py

Fixes #599 

* Only set can_stream: false if it is false

Refs simonw/llm#600 (comment)

* Docs for can_stream: false

---------

Co-authored-by: Simon Willison <[email protected]>
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.

Allow setting can_stream in extra-openai-models.yaml to allow for o1 over proxy

2 participants