Skip to content

Conversation

@tmaptible
Copy link

No description provided.

@tmaptible tmaptible force-pushed the sc-35229 branch 2 times, most recently from 8d7ed10 to dcc5223 Compare November 14, 2025 23:44
@UserNotFound UserNotFound removed their request for review December 4, 2025 16:30
@UserNotFound
Copy link
Member

Removing myself for now, as it looks like this requires a merge conflict to be resolved, updated API gem to be released and updated here, etc.

Copy link

@eabruzzese eabruzzese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything's working for me. Added a couple of notes/questions out of curiosity, but it does what it says on the tin, and I think that's good enough for the internal beta.

Might be worth having someone more knowledgeable about the intended patterns in the CLI take a look as well, though.

Commenting for now since the tests haven't passed, but tentatively approved.

Comment on lines +23 to +26
# URL-safe base64 encode the note for safe transport to deploy-api
# deploy-api will validate and encrypt it before storing in LLM Gateway
require 'base64'
opts[:note] = Base64.urlsafe_encode64(options[:note], padding: true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: why do we base64-encode here? We say "safe transport", but I'm not sure I understand how it helps, since we're POSTing a JSON payload over HTTPS. It looks like the encryption strategy in deploy-api involves base64-encoding the payload, but it seems to me like it would be better to have deploy-api do that instead of the client?

Comment on lines +52 to +59
if ENV['APTIBLE_DEBUG'] == 'DEBUG'
begin
tokens_array = tokens.map(&:body)
CLI.logger.warn "GET /accounts/#{account.id}/ai_tokens response: #{JSON.pretty_generate(tokens_array)}"
rescue StandardError
CLI.logger.warn "GET /accounts/#{account.id}/ai_tokens response: #{tokens.map(&:body).inspect}"
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit for later): there are a lot of these kinds of debug blocks, and I wonder if there's a more generic place to put debug logic related to API calls?

telemetry(__method__, options.merge(id: id))

# GET /ai_tokens/:id via HAL
# Must set root URL explicitly for the request to work

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why this is the case? Just curious.

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.

4 participants