Commit Graph
74758 Commits
Author SHA1 Message Date
Jocelyn Liu 79a7b57ea3 [AI Chat] [BYOM] Use shared oai_message_utils in GenerateQuestionSuggestions (#32916)
- Use BuildOAIQuestionSuggestionsMessages and BuildOAISeedMessage in
  EngineConsumerOAIRemote::GenerateQuestionSuggestions to build an
  array of OAIMessage
- Move question prompt to ai_chat_prompts.grdp and use it when
  translating the customized content block for request questions
  in oai_api_client
- Add page content blocks (page text or video) serialization in
  oai_api_client
- Increase OAI GenerateQuestionSuggestions unit test coverage to verify
  the actual messages we built
- Remove unused user prompt in page content prompts
- Update unit tests
2026-01-21 03:21:04 +00:00
Nuo Xu 1de364ecb3 [iOS][Wallet] Add wallet debug boolean value for webui (#33324)
add wallet debug boolean value for webui
2026-01-20 21:58:04 -05:00
Aleksei Seren 4782fda811 [ads] Add brave_ads virtual_pref target (#33292)
This PR moves `virtual_pref` related files
to a separate target. This is a pre-requisite
for moving Brave Ads code under a build flag.
2026-01-21 00:35:17 +00:00
Brian R. Bondy f1b31634cd Fix Brave Origin Settings Handler file path (#33321) 2026-01-20 19:09:12 -05:00
brave-builds ec0e6e75eb 1.88.46 2026-01-21 00:03:51 +00:00
Douglas Daniel 12611bee1a [Wallet]: Fix Broken QR Codes (#33316)
Fixes a bug where QR Codes where not loading in the Wallet
2026-01-20 16:49:21 -06:00
Terry Mancey fe5f9a7899 [ads] Improve PUT /v3/confirmation/payment/{paymentId} retry logic (#33286)
Only retry payment token redemptions when the failure is potentially
transient.

Treat response codes as follows:

200: success
4XX: permanent failure (do not retry)
anything else: retry
2026-01-20 21:50:25 +00:00
Aleksei Seren 98c822e355 [ads] Add brave_ads new_tab_page_ad target (#33296)
[ads] Organize NTP ad prefetcher target

This PR organizes `NTP ad prefetcher` target
to move related files to brave_ads core public directory.  This is a pre-requisite for
moving Brave Ads code under a build flag.
2026-01-20 16:45:48 -05:00
Aleksei Seren ba810714d3 [ABOM] Shields panel fixes (#33290)
The PR does the following:
- Updates Shields Panel ABOM
description text to cover Shields
DOWN case
- Updates buttons in ABOM to show
only `Report site` when Shields are
`DOWN`
2026-01-20 15:44:20 -05:00
Jocelyn Liu b521fc8b8b [AI Chat] Support client side tools in conversation API v2 (#32902)
This PR mainly moved logic directly from conversation API v1 to v2 with
following changes:

- Return nullopt when completion content is empty in
  ParseOAICompletionResponse. It shouldn't lead to a completion event
  with empty string in conversation API cases, as we currently see
  responses with tool_calls where content is empty string. This would
  just make v2 follow the v1 behavior. For OAI, we return empty
  completion event in OnQueryCompleted anyway, so it doesn't change
  the behavior. The behavior change on OAI is we wouldn't fire
  completion event in OnQueryDataReceived if content is empty, but it
  does make sense in this case as there is no point fire it.
  Also Extract GetOAIContentContainer for future usage.
- Copy and migrate tool handling logic from v1 to v2:
  1. Tool Calls Now Belong to Messages, Not Events (oai_message_utils.h)
  - Added tool_calls field to OAIMessage struct for assistant messages
  - Added tool_call_id field for tool result messages (role="tool")

  2. Message Serialization (conversation_api_v2_client.cc)
  - Tool calls now accessed from message.tool_calls instead of event.tool_calls
  - Tool calls and tool_call_id set on message_dict instead of event_dict
  - Removed the special "toolCalls" type that was used when messages had both content and tool calls

  3. Message Building (oai_message_utils.cc)
  - Tool calls are now accumulated in the assistant message's tool_calls array
  - The assistant message is added to the list first
  - Tool results are then added as separate messages with role="tool" after the assistant message
  - Previously, tool results were added as separate events in a flat structure

  4. Tool Call Parsing (conversation_api_v2_client.cc)
  - Tool calls now parsed from inside choices[0].delta.tool_calls or choices[0].message.tool_calls
  - Previously looked for tool_calls at the top level of result_params

  Bottom Line

  The v2 implementation now properly follows OpenAI's message format where:
  - Assistant messages contain tool_calls arrays
  - Tool results are separate messages with role="tool" and tool_call_id
  - This replaces the flatter event-based structure from v1
  Logics and code structures are kept the same as v1 as much as possible
  to help with review and easier transition.
- Migrate existing unittests, no new tests for oai_message_utils as
  it's well covered in existing engine consumer and api_client unit
  tests.
2026-01-20 19:57:14 +00:00
Terry Mancey 6a650fbb24 [ads] Improve POST /v4/confirmation/{transactionId} retry logic (#33284)
Only retry confirmations when the error is potentially transient.

Treat response codes as follows:

2XX: success
4XX: permanent failure (do not retry)
anything else: retry
2026-01-20 14:48:25 -05:00
Terry Mancey a2bdd74b07 [ads] Improve /v3 confirmation token retry logic (#33287)
Only retry token requests when the failure is potentially transient.

For POST /v3/confirmation/token/{paymentId}:

201: success
4XX: do not retry
anything else: retry

For GET /v3/confirmation/token/{paymentId}?nonce={nonce}:

200: success
4XX: do not retry
anything else: retry
2026-01-20 19:03:40 +00:00
Brian R. Bondy 13bf5e3a82 Modify onboarding for Brave Origin (#33257)
Skip WDP onboarding step and modify last step
2026-01-20 13:20:51 -05:00
Terry Mancey 27e281dd49 [ads] Improve /v3 confirmation retry logic (#33285)
* [ads] Improve POST /v4/confirmation/{transactionId} retry logic

Only retry confirmations when the error is potentially transient.

Treat response codes as follows:

2XX: success
4XX: permanent failure (do not retry)
anything else: retry

* [ads] Improve /v3 confirmation retry logic

Only retry confirmations when the error is potentially transient.

For POST /v3/confirmation/{transactionId}/{credential}:

2XX and 418: success
4XX: permanent failure (do not retry)
anything else: retry

For GET /v3/confirmation/{transactionId}/paymentToken:

200: success
4XX: permanent failure (do not retry)
anything else: retry
2026-01-20 13:19:56 -05:00
Brian R. Bondy 94e064b2a7 Get rid of BraveOrigin mojo common dir (#33277) 2026-01-20 13:18:27 -05:00
Douglas Daniel 3cda32b8cd [Wallet]: Remove Focus Outline Around Line Chart (#33312)
Fixes a bug where there was a Focus Outline being applied to the Line Chart.
2026-01-20 12:08:02 -06:00
Terry Mancey 8d0db682d0 [ads] Add HTTP Status Code classifier tests (#33314) 2026-01-20 18:05:02 +00:00
Kyle Hickinson 152a93dcb3 [iOS] Update darkreader dependency (#33018)
DarkReader is used to power the Night Mode feature on iOS, this change updates it from `4.9.87` (Jun 2024) to `4.9.119` (Jan 2026)
2026-01-20 17:26:05 +00:00
Aleksei Seren 04e483d3fc [ads] Add brave_ads core network target (#33227)
[ads] Add brave_ads/core/browser/network target

This PR organizes brave_ads/core/browser/service
to move network related files to a separate target.
This is a pre-requisite for moving Brave Ads code under
a build flag.
2026-01-20 12:13:20 -05:00
Kyle Hickinson 809ab607d4 [iOS] [AI Chat] Expose custom models private IPs feature flag (#33293)
This simply adds the `brave-ai-chat-allow-private-ips` feature flag to iOS's `brave://flags` page which will be useful in future implementations of custom models in iOS
2026-01-20 11:37:52 -05:00
Kyle Hickinson ab951e861a [iOS] [AI Chat] Expose methods to add/modify/remove custom models (#33294)
This change adds bridging methods to deal with BYOM (bring your own model) in Leo
2026-01-20 11:31:14 -05:00
Terry Mancey 88e9486a88 [ads][CodeHealth] IWYU and unused parameters (#33308)
Improves code health by applying IWYU to clean up include usage and
commenting out unused parameters to reduce warnings, improve
readability, and keep the ads codebase easier to maintain.
2026-01-20 16:15:23 +00:00
Terry Mancey 21edbe13b9 [ads] Improve GET /v9/catalog retry logic (#33289)
Only retry catalog requests when the failure is potentially transient.

Treat response codes as follows:

200: success
4XX: do not retry
anything else: retry
2026-01-20 11:13:52 -05:00
Terry Mancey 91e376383d [ads] Improve GET /v3/issuers retry logic (#33288)
Only retry requests when the failure is potentially transient.

Since this endpoint is served via CloudFront:

200: success
4xx: permanent failure (do not retry)
anything else: retry
2026-01-20 11:13:07 -05:00
Terry Mancey fa0041f01f [ads] Unit test code health (#33307)
Tests were passing because the CreateRewardConfirmation endpoint didn’t
validate HTTP response codes. Now that #51203 properly checks responses,
we need to ensure the credential is created correctly so the
confirmation request succeeds and the tests reflect expected outcomes.
BuildCreateRewardConfirmationUrlPath should use confirmation for
transaction id and credential, and unnecessary url request mocks were
removed since they were not needed.
2026-01-20 16:07:36 +00:00
brave-builds 55b4d4f45a 1.88.45 2026-01-20 16:02:55 +00:00
Aleksei Seren b08bd57a52 [ads] Brave Ads buildflag for Wallet and Tor (#33306)
The PR adds Brave Ads buildflag checks to
Brave Wallet and Brave Tor code which depend
on Brave Ads. This is a pre-requisite for moving
Brave Ads code under a build flag.
2026-01-20 15:05:58 +00:00
Aleksei Seren 31c9bf9574 [ads] Add Brave Ads buildflag for NTP code (#33190)
Add Brave Ads buildflag checks to NTP code which
depends on Brave Ads. This is a pre-requisite for moving
Brave Ads code under a build flag.
2026-01-20 08:49:49 -05:00
Szilard Szaloki 720d311f43 Account: implements ResendConfirmationEmail() (#33303) 2026-01-20 06:49:01 -07:00
Pavel Beloborodov 2ce409f4d0 Localhost Permission => Local Network Access cleanup (#32910)
Brave's custom localhost access permission feature has been replaced with Chromium's Local Network Access (LNA) feature.
2026-01-20 20:20:32 +07:00
brave-builds dec861a743 1.88.44 2026-01-20 12:32:53 +00:00
brave-builds 05b1c11c7f 1.88.43 2026-01-20 12:03:01 +00:00
Sangwoo Ko 12f350bef3 Rename Midnight theme to Ultra dark theme. (#33230)
We decided to decouple the darker theme from the Midnight channel.
So rename the feature flag and the string to Ultra dark theme.
2026-01-20 01:10:24 -07:00
Anirudha Bose 3074cab896 [Wallet] Pass BitcoinTxMeta in callback instead of constructing from pieces (#33272) 2026-01-20 07:43:01 +00:00
Szilard Szaloki bb16de65e7 Adds initiatingServiceName to the request body of PasswordInit and LoginInit. (#33244) 2026-01-20 00:12:38 -05:00
Francois Marier f50fadb4e9 Re-add brave-keyring as a dependency of brave-browser (#33298)
Fixes brave/brave-browser#52057

The brave-keyring was originally added in brave/brave-browser#4205
but commit ac8d7ef938 accidentally
removed it.
2026-01-19 20:00:31 -08:00
Emerick Rogul 60c728c9e8 Disable failing upstream PermissionElement origin trials browser test (#33270)
This upstream test was missed when disabling `PermissionElement` for origin
trials (not sure how exactly, but it's failing consistently).
2026-01-19 22:33:23 -05:00
brave-builds 254f952025 1.88.42 2026-01-20 00:22:05 +00:00
Wojciech Knapik 3a20ee475f Fixed brave-core version (#33302) 2026-01-20 01:18:19 +01:00
Sangwoo Ko c0d22636d1 Remove direct access to Browser(View) from BraveBrowserViewLayout (#32979)
* Remove direct access to Browser(View) from BraveBrowserViewLayout

Upstream has introduced BrowserViewLayoutDelegate to avoid direct access
to Browser(View) from BrowserViewLayout.

In favor of this change, move all the logic that depend on Browser(View)
from BraveBrowserViewLayout to BrowserViewLayoutDelegate.
BrowserViewLayoutDelegate is a new class that is responsible for
providing the necessary information to BraveBrowserViewLayout.
2026-01-20 09:02:40 +09:00
Serg 083d518099 [Android] Fixes a crash on VPN service stop. (#33291)
Resolves: https://github.com/brave/brave-browser/issues/52102
2026-01-19 22:52:37 +00:00
Brian R. Bondy af374e6aab Fix Brave Origin win installer brand rc generation (#33279) 2026-01-19 16:35:49 -05:00
Aleksei Seren 5035b4095b [ads] Add Brave Ads buildflag for Rewards code (#33180)
Add Brave Ads buildflag checks to Brave Rewards code
which depends on Brave Ads. This is a pre-requisite for
moving Brave Ads code under a build flag.
2026-01-19 16:27:23 -05:00
brave-builds 8466aac818 1.88.40 2026-01-19 21:05:12 +00:00
Terry Mancey 20807e12db [ads] Increase confirmation redemption retry max backoff from 1h to 6h (#33274)
During a recent recovery, we saw a high volume of v4 redemption retries
submitted over a short period. Since the max retry backoff is capped at
1 hour, queued retries from running browsers are retried within the same
1-hour window, concentrating traffic and increasing database load.
2026-01-19 20:50:46 +00:00
Szilard Szaloki f80f3a3820 Endpoint client: always instantiate empty SuccessBody/ErrorBody (#33275) 2026-01-19 20:25:45 +00:00
Terry Mancey bc827bbe7c [ads] Add HTTP Status Code classifier helper (#33276)
Classify HTTP status codes into high level classes so callers can make
consistent decisions (like retry vs fail fast) without handling every
individual status code.
2026-01-19 19:58:12 +00:00
Darnell Andries 6d0f97f979 Integrate SkillsMetrics (#33051)
* Add `SkillsMetrics` class

* Address PR feedback

* Integrate `SkillsMetrics`

* Address PR feedback
2026-01-19 11:45:32 -08:00
brave-buildsandbrave-builds-ro ec4e55124a Roll perf profiles update (update-perf-profile-2026-01-19-17-05) (#33278)
* Update perf profile brave-typical-android using v1.88.38
* Update perf profile brave-typical-win using v1.88.37
* Update perf profile chrome-typical-android using v1.88.38
* Update perf profile chrome-typical-win using v1.88.37
* Update perf profile brave-typical-mac using v1.88.36
* Update perf profile chrome-typical-mac using v1.88.36
---------

Co-authored-by: brave-builds-ro <devops+robuilds@brave.com>
2026-01-19 23:44:58 +04:00
Christian Mazakas efb95a3eba update PolkadotTxMeta to display in UI (#33237)
Resolves brave/brave-browser#51939

This PR moves the code away from storing the encoded extrinsic.

The main motivation for this change is because decoding it reliably and well
relies on the chain metadata which is asynchronously fetched and currently,
all of the code that parses the transaction JSON from the backing data files
assumes a world of purely synchronous code.

Instead of opting into async data sources, we simply update the code to eschew
it by storing a more normalized format of rote data.

The code also updates the transaction metadata to store an ss58 prefix if the
send address was ss58-encoded. This is done so that we can store the recipient
address in its plain hex form and then reconstruct it on the front-end so that
what's displayed now matches perfectly with what the user originally typed in.
2026-01-19 11:42:32 -08:00