Skip to content

Conversation

@pettni
Copy link
Contributor

@pettni pettni commented Feb 21, 2025

Pass adapter.raw through adapter:set_env_vars() to enable variable substitution.

Also appends adapter.raw to the static raw arguments defined in the http client.

Description

Implements the change discussed in #974 that makes it easier to write an adapter for AWS Bedrock Anthropic models.

Testing

Tested with my custom Bedrock adapter, as well as a built-in adapter (deepseek).

@olimorris
Copy link
Owner

Awesome, thank you for this. Do you think you could add a singular test case to the adapter test file too? I'm keen to make sure any features that people add, we support with tests so I don't accidentally break them in the future.

@pettni pettni force-pushed the main branch 2 times, most recently from 1fde20c to 3958312 Compare February 22, 2025 00:04
Pass adapter.raw through adapter:set_env_vars() to enable variable substitution.

Also appends adapter.raw to the static raw arguments defined in the http client.
@pettni
Copy link
Contributor Author

pettni commented Feb 22, 2025

Sure, always a good idea to have some test. I added one in the http test file that tests that variable substitutions have been done in the data that is going to curl

@olimorris olimorris merged commit 6c628f5 into olimorris:main Feb 22, 2025
4 checks passed
@olimorris
Copy link
Owner

Fantastic. Thanks for such a great PR and would love to see your AWS Bedrock implementation too.

This was referenced Feb 22, 2025
cleong14 pushed a commit to cleong14/codecompanion.nvim that referenced this pull request May 21, 2025
Pass adapter.raw through adapter:set_env_vars() to enable variable substitution.

Also appends adapter.raw to the static raw arguments defined in the http client.
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