Repository navigation
feat(chat_github): Use newer REST API base url - #726
Merged
Merged
Conversation
hadley
approved these changes
Aug 22, 2025
| model <- pieces[[2]] | ||
| } else if (provider == "github") { | ||
| # GitHub model names use the `provider/model` format | ||
| model <- paste(pieces[-1], collapse = "/") |
Member
There was a problem hiding this comment.
What about open router and friends? Do they use this format too? Maybe we should just pass along unconditionally and allow the model to error?
Collaborator
Author
There was a problem hiding this comment.
Yeah that sounds reasonable. It's how I implemented this first until I saw the chat() tests and became conflicted. I'd certainly rather let the API throw than to need to maintain a list of exceptions here.
schloerke
added a commit
that referenced
this pull request
Sep 9, 2025
* main: (95 commits) fix(chat): Call `check_echo()` in `chat()` for consistent echo behavior (#742) Increment version number to 0.3.2.9000 Increment version number to 0.3.2 Don't run `content_image()` on CRAN (#739) feat(chat_): Add `params` and `model` to all `chat_` functions (#699) Fix spelling in `tool_prompt.md` (#730) Fix typos in source comments and regenerate documentation (#736) Fix news bullet Increment version number to 0.3.1.9000 Increment version number to 0.3.1 Update cran comments Check revdpes Re-build readme Typo fixes (#686) Polish news Update to latest Air settings and use `format-suggest.yaml` (#683) Use newer REST API base url (#726) Fix auth scope and API endpoints for Google Vertex (#704) Run `Rscript data-raw/prices.R` to update pricing info (#727) Improve error message for `batch_chat()` (#716) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
chat_github()to use https://models.github.ai/inference instead of https://models.inference.ai.azure.com, while leaving a note in the docs about the previousbase_url.I also updated
models_github(), which includes some newer fields. I kept support for listing models from the previous endpoint, too.One interesting twist: GitHub models use the
provider/modelformat. So I carved out an exception inchat()that lets users writechat("github/openai/gpt-4.1")(that requires #699 to work).