<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>camden&#39;s blog</title>
  <subtitle>A blog about programming and other stuff</subtitle>
  <link href="https://camden.codes/posts/feed.xml" rel="self" />
  <link href="https://camden.codes/" />
  <updated>2025-02-28T01:03:11Z</updated>
  <id>https://camden.codes/</id>
  <author>
    <name>camden</name>
    <email>admin@hermiod.com</email>
  </author>
  <entry>
    <title>Getting Claude Code to Work with AWS Bedrock</title>
    <link href="https://camden.codes/posts/getting-claude-code-to-work-with-bedrock/" />
    <updated>2025-02-28T01:03:11Z</updated>
    <id>https://camden.codes/posts/getting-claude-code-to-work-with-bedrock/</id>
    <content type="html">&lt;p&gt;Getting Claude Code to work with AWS Bedrock requires some configuration that isn&#39;t obvious from the documentation. Here&#39;s what I learned after working through a few issues.&lt;/p&gt;
&lt;h2&gt;The Solution&lt;/h2&gt;
&lt;p&gt;The key was combining multiple environment variables and properly exporting AWS credentials. Here&#39;s the shell script I created to make it all work:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token shebang important&quot;&gt;#!/bin/zsh&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Set AWS credentials from profile&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;$(&lt;/span&gt;aws configure export-credentials &lt;span class=&quot;token parameter variable&quot;&gt;--profile&lt;/span&gt; ravenna-staging &lt;span class=&quot;token parameter variable&quot;&gt;--format&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Set environment variables&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;AWS_REGION&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;us-west-2
&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;CLAUDE_CODE_USE_BEDROCK&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;ANTHROPIC_MODEL&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;us.anthropic.claude-3-7-sonnet-20250219-v1:0&#39;&lt;/span&gt;
&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;DISABLE_PROMPT_CACHING&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Launch Claude with all arguments passed to this script&lt;/span&gt;
claude &lt;span class=&quot;token string&quot;&gt;&quot;&lt;span class=&quot;token variable&quot;&gt;$@&lt;/span&gt;&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Critical Components&lt;/h2&gt;
&lt;p&gt;There were two critical parts to making this work:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Exporting AWS credentials&lt;/strong&gt; from an existing profile into the current terminal environment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setting the AWS_REGION&lt;/strong&gt; explicitly (even if your default AWS region is set in your config)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/anthropics/claude-code/issues/6#issuecomment-2680841040&quot;&gt;GitHub issue #6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/anthropics/claude-code/issues/93#issuecomment-2685165687&quot;&gt;GitHub issue #93&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Gemini Flash 2.0 Live API fails the vibe check for me</title>
    <link href="https://camden.codes/posts/gemini-flash-2-0-vibe-check/" />
    <updated>2025-02-28T01:03:11Z</updated>
    <id>https://camden.codes/posts/gemini-flash-2-0-vibe-check/</id>
    <content type="html">&lt;p&gt;I had a couple conversations with the new &lt;a href=&quot;https://camden.codes/stubs/&quot;&gt;Multimodal Live API&lt;/a&gt; through the &lt;a href=&quot;https://camden.codes/wiki/google-ai-studio/&quot;&gt;Google AI Studio&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wanted to have a voice-to-voice conversation about an idea I was working through, and wanted Flash to walk me through what the potential pitfalls are.&lt;/p&gt;
&lt;p&gt;Flash didn&#39;t give me the sophisticated kind of response that I expect from Claude or ChatGPT. I specifically asked Flash to compare and contrast different AWS instances and it wouldn&#39;t list them out (despite it being pretty obvious that it would have that knowledge).&lt;/p&gt;
&lt;p&gt;Based on the style of the voice, it sounds like the voice is generated from text-to-speech as opposed to &amp;quot;natively multimodal&amp;quot; right now. Some of the responses were a little awkward.&lt;/p&gt;
&lt;p&gt;I&#39;m sure it&#39;s just early, and they&#39;ll make improvements. It&#39;s also unfair to compare the &amp;quot;Flash&amp;quot; line of models with Sonnet and 4o.&lt;/p&gt;
&lt;p&gt;I really just want Advanced Voice Mode with GPTs! I want to be able to orchestrate some basic workflows with my voice. Coming soon, I&#39;m sure.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>My favorite new prompting trick: chat prefix completion</title>
    <link href="https://camden.codes/posts/chat-prefix-completion/" />
    <updated>2025-02-28T01:03:11Z</updated>
    <id>https://camden.codes/posts/chat-prefix-completion/</id>
    <content type="html">&lt;p&gt;I&#39;ve been working with the Deepseek API while working on my tool &lt;a href=&quot;https://github.com/camdenclark/carrier.nvim&quot;&gt;carrier.nvim&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It has a new beta feature that &lt;a href=&quot;https://camden.codes/wiki/anthropic/&quot;&gt;Anthropic&lt;/a&gt; also has that is really excellent, called chat prefix completion. You can just set what the assistant message response should start with.&lt;/p&gt;
&lt;p&gt;This is really useful for contexts like code completion, where you want the model to always respond with just the code you want by starting the response with three backticks and a newline (essentially saying the assistant response should start a code block).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://platform.deepseek.com/api-docs/chat_prefix_completion&quot;&gt;https://platform.deepseek.com/api-docs/chat_prefix_completion&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This makes getting Just the Code back consistently really easy for my tool! I highly recommend you try this out in your applications, especially if you&#39;re asking for code completions.&lt;/p&gt;
</content>
  </entry>
</feed>